[FFmpeg-devel] [PATCH] Add space after commas in HTTP/RTSP auth header
michael at niedermayer.cc
Wed Oct 7 00:12:46 CEST 2015
On Tue, Oct 06, 2015 at 10:00:29AM -0400, Calvin Walton wrote:
> On Thu, 2015-10-01 at 13:56 +0300, Andrey Utkin wrote:
> > This fixes access to Grandstream cameras, which return 401 to ffmpeg
> > otherwise.
> > VLC sends Authorization: header with spaces between parameters, and
> > it
> > is known to work with Grandstream devices and broad range of other
> > HTTP
> > and RTSP servers, so author considers switching to such behaviour
> > safe.
> > Just for record - RFC 2617 (HTTP Auth) does not specify the need in
> > spaces, so this is not a bug of FFmpeg.
> For those curious about the updated versions of the HTTP/1.1 specs, the
> current HTTP Auth RFC 7235 uses the # (list) ABNF from RFC 7230 section
> 7, which specifies the separator as "," surrounded by OWS (optional
> whitespace). Section 3.2.3 says:
> The OWS rule is used where zero or more linear whitespace octets
> might appear. For protocol elements where optional whitespace is
> preferred to improve readability, a sender SHOULD generate the
> optional whitespace as a single SP; otherwise, a sender SHOULD NOT
> generate optional whitespace except as needed to white out invalid or
> unwanted protocol elements during in-place message filtering.
> So in this case, using ", " as the separator appears to be preferred
> but not required by the RFCs. But it certainly doesn't require that the
> space is present! I agree that this isn't really an FFmpeg bug, but
> switching to use ", " is probably a good idea regardless.
ok, thanks for the explanation
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel