[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: release/2.7 | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [6d3f047a8592d223cd7caa21264899c21a619807] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer (cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d3f047a8592d223cd7caa21264899c21a619807 --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: release/2.6 | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [289e74d72dbdcd82f5c3f3e630ac9c7bebf1283b] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer (cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=289e74d72dbdcd82f5c3f3e630ac9c7bebf1283b --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: release/2.5 | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [630ef0976615a6a6b9a1721a5733c9376e1e8fd5] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer (cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=630ef0976615a6a6b9a1721a5733c9376e1e8fd5 --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: release/2.4 | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [eaf03fa8304c7a9ace12f203811641efd64c0c0f] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer (cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eaf03fa8304c7a9ace12f203811641efd64c0c0f --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: master | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [fdb32838723effb4560a345013387ea37b85ff20] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fdb32838723effb4560a345013387ea37b85ff20 --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/httpauth: Add space after commas in HTTP/RTSP auth header
ffmpeg | branch: release/2.8 | Andrey Utkin | Thu Oct 1 13:56:31 2015 +0300| [6dcd2ebd34b60de6333ec3b2c18f5688ff79cd13] | committer: Michael Niedermayer avformat/httpauth: Add space after commas in HTTP/RTSP auth header 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. Signed-off-by: Michael Niedermayer (cherry picked from commit fdb32838723effb4560a345013387ea37b85ff20) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dcd2ebd34b60de6333ec3b2c18f5688ff79cd13 --- libavformat/httpauth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index dbe3eff..18cf36b 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -220,21 +220,21 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, /* TODO: Escape the quoted strings properly. */ av_strlcatf(authstr, len, "username=\"%s\"", username); -av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm); -av_strlcatf(authstr, len, ",nonce=\"%s\"", digest->nonce); -av_strlcatf(authstr, len, ",uri=\"%s\"", uri); -av_strlcatf(authstr, len, ",response=\"%s\"", response); +av_strlcatf(authstr, len, ", realm=\"%s\"", state->realm); +av_strlcatf(authstr, len, ", nonce=\"%s\"", digest->nonce); +av_strlcatf(authstr, len, ", uri=\"%s\"", uri); +av_strlcatf(authstr, len, ", response=\"%s\"", response); // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) -av_strlcatf(authstr, len, ",algorithm=\"%s\"", digest->algorithm); +av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); if (digest->opaque[0]) -av_strlcatf(authstr, len, ",opaque=\"%s\"", digest->opaque); +av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { -av_strlcatf(authstr, len, ",qop=\"%s\"",digest->qop); -av_strlcatf(authstr, len, ",cnonce=\"%s\"", cnonce); -av_strlcatf(authstr, len, ",nc=%s", nc); +av_strlcatf(authstr, len, ", qop=\"%s\"",digest->qop); +av_strlcatf(authstr, len, ", cnonce=\"%s\"", cnonce); +av_strlcatf(authstr, len, ", nc=%s", nc); } av_strlcatf(authstr, len, "\r\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog