In the HTTP header, line breaks are tokens to separate fields in the header.
But, if I wan't to send a line break literal in a custom field how should I escape it?
In the HTTP header, line breaks are tokens to separate fields in the header.
But, if I wan't to send a line break literal in a custom field how should I escape it?
I hope I'm understanding your question, but typical line break sequence are "\n" "\t" "\r".
If you are designing your own custom extension field, you may use BASE64 or quoted-printable to escape(and unescape) the value.
If it's a custom field how you escape it depends entirely on how the targetted application is going to parse it. If this is some add on you created you could stick with URL encoding since it's pretty tried and true and lots of languages have encoding/decoding methods built in so your web app would encode it and your plug in (or whatever you're working on) would decode it.
According to RFC2616 4.2 Message Headers :-
Header fields can be extended over multiple lines by preceding each extra line with at least one SP or HT.
I assume SP means a space character and HT means a hard tab character.