[FFmpeg-devel] [PATCH]Add one CRLF to http headers if necessary

Michael Niedermayer michaelni at gmx.at
Mon Mar 16 17:23:22 CET 2015


On Mon, Mar 16, 2015 at 04:04:16PM +0100, Nicolas George wrote:
> Le primidi 21 ventôse, an CCXXIII, Michael Niedermayer a écrit :
[...]
> "\r\n", five exclamation marks or an ASCII-art tortoise.

<put some joke about how a computer can recognize ASCII-art tortoises
here>


> 
> For the GUI application that you suggested earlier, and similar
> applications: First, I consider them rather unlikely: exporting an expert
> option in a GUI with a simple text entry is way too fragile. Still, let us
> admit it exists. It must do a special case for HTTP headers, since it is a
> multi-line field. In that case, doing a special case for sanitizing the
> string is not too much to ask. Of course, lavu can help: I would have no
> objection to some kind of "av_string_normalize_line_breaks(&str)" to do the
> actual work.
> 
> For command-line applications accepting the options directly from the user:
> For Unix shells: benefit: the user can hit return without hitting Ctrl-V
> Ctrl-M before, two extra keys. Not much.
> For the windows shell: benefit: 0. I suspect hitting return with unclosed
> quotes will not have the desired effect. And CRLF is the native windows line
> ending anyway.
> 
> The global benefit, as I see it, is rather feeble.
> 

> I can propose a middle ground:
> 
> Normalize line endings, but still print a warning.
> 
> That way, lazy users can spare the few keys, but we are free to break it if
> we need/want.

ok, that sounds very acceptable to me

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150316/c1687ce1/attachment.asc>


More information about the ffmpeg-devel mailing list