Browse code

textops: docs - some enhancements to basic header operations functions

(cherry picked from commit 374f0f05bdf27ddaf5d8652560738fbfb886c43c)

Daniel-Constantin Mierla authored on 26/10/2020 09:53:24
Showing 1 changed files
... ...
@@ -872,13 +872,15 @@ if (has_body("multipart/mixed")) {
872 872
 		<function moreinfo="none">append_to_reply(txt)</function>
873 873
 		</title>
874 874
 		<para>
875
-		Append txt as header to the reply.
875
+		Append txt as header to the reply that is going to be generated by
876
+		&kamailio; (e.g., via sl_send_reply(...)).
876 877
 		</para>
877 878
 		<para>Meaning of the parameters is as follows:</para>
878 879
 		<itemizedlist>
879 880
 		<listitem>
880 881
 			<para><emphasis>txt</emphasis> - String which may contains
881
-			pseudo-variables.
882
+			pseudo-variables. Note that the value has to be ended with "\r\n"
883
+			(end of header characters sequence).
882 884
 			</para>
883 885
 		</listitem>
884 886
 		</itemizedlist>
... ...
@@ -902,15 +904,16 @@ append_to_reply("Foo: $rm at $Ts\r\n");
902 904
 		<function moreinfo="none">append_hf(txt[, hdr])</function>
903 905
 		</title>
904 906
 		<para>
905
-		Appends 'txt' as header after first header field or after
906
-		last 'hdr' header field.
907
+		Appends 'txt' as header at the end of the all headers, or after
908
+		last header named 'hdr' if the second parameter is provided.
907 909
 		</para>
908 910
 		<para>Meaning of the parameters is as follows:</para>
909 911
 		<itemizedlist>
910 912
 		<listitem>
911 913
 			<para><emphasis>txt</emphasis> - Header field to be appended. The
912 914
 			value can contain pseudo-variables which will be replaced at run
913
-			time.
915
+			time. Note that the value has to be ended with "\r\n" (end of header
916
+			characters sequence).
914 917
 			</para>
915 918
 		</listitem>
916 919
 		<listitem>
... ...
@@ -939,15 +942,16 @@ append_hf("From-username: $fU\r\n", "Call-ID");
939 942
 		<function moreinfo="none">insert_hf(txt[, hdr])</function>
940 943
 		</title>
941 944
 		<para>
942
-		Inserts 'txt' as header before the first header field or before
943
-		first 'hdr' header field if 'hdr' is given.
945
+		Inserts 'txt' as header before the first header field, or before
946
+		first header named 'hdr'if the second parameter is provided.
944 947
 		</para>
945 948
 		<para>Meaning of the parameters is as follows:</para>
946 949
 		<itemizedlist>
947 950
 		<listitem>
948 951
 			<para><emphasis>txt</emphasis> - Header field to be inserted. The
949 952
 			value can contain pseudo-variables which will be replaced at run
950
-			time.
953
+			time. Note that the value has to be ended with "\r\n" (end of header
954
+			characters sequence).
951 955
 			</para>
952 956
 		</listitem>
953 957
 		<listitem>