[FFmpeg-devel] [PATCH]Add one CRLF to http headers if necessary
michaelni at gmx.at
Wed Mar 11 15:18:16 CET 2015
On Wed, Mar 11, 2015 at 02:59:04PM +0100, Nicolas George wrote:
> Le primidi 21 ventôse, an CCXXIII, Michael Niedermayer a écrit :
> > the question or well rather my question is why do they need to put
> > control characters in there in the first place.
> > There should be no need for that
> Control characters are the only characters that are not valid in a HTTP
> header value, therefore they are the only usable delimiters to group several
> headers in a single string, unless you want to implement one more level of
> Or do you have another solution in mind?
well i sure do not want more escaping and yes i do, or lets say i
think i do.
If the user passes just one header "line" then either he adds
CRLF at the end or he doesnt. These 2 cases can be easily distnguished
and teh code can add CRLF if its missing
this is basically carls patch and i think its good and simplifies
useage, doing this at cmdutils level is not a good idea IMHO as
other applications as well need to pass header strings from the user
to lavf. and requiring every app, GUI based ones included to
sanitize the string before passing it on or requireing the user to
litterally add the CRLF somehow seems very inconvenient to me
The case of multiple header lines is trickier, http uses CRLF as
seperator IIRC. My idea was to be a bit more flexible here and allow
any line ending character and normalize these to CRLF before sending
them. This is your first patch i belive.
This would allow users to just use a quote and the enter key after each
header i assume on the command line. While in a textfield of a GUI
it can be entered easily 1 line per header.
Maybe iam missing something here but it seems convenient to allow
this than to strictly require CRLF
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel