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

Michael Niedermayer michaelni at gmx.at
Tue Mar 10 12:44:13 CET 2015


On Tue, Mar 10, 2015 at 09:39:50AM +0100, Nicolas George wrote:
> Le nonidi 19 ventôse, an CCXXIII, Michael Niedermayer a écrit :
> > there should be a loop that replaces each sequence of any \n\r by a single
> > crlf sequency
> 
> > also ensure that one such sequence is at the end
> 
> I believe this would be correct.
> 
> > using no \r \n codes but only litteral bytes and
> 
> This part would also be correct, but I believe it is completely unnecessary:
> POSIX specifies the byte value of \r and \n (the C standard does not), and
> AFAIK we never had bug reports that could even remotely be linked to that
> issue. And seriously, if a compiler were to use different values, FATE would
> fail all over the place immediately.
> 
> It does not matter much, since this is equivalent, but I believe most C
> programmers will find \n and \r much more readable than \012 and \015 or
> even \x0a and \x0d; I do.

iam fine with either, i was just trying to be completely correct
which may be overkill and indeed make the code less readable for no
gain

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/20150310/a4771baa/attachment.asc>


More information about the ffmpeg-devel mailing list