[FFmpeg-cvslog] http: Check the auth string contents and not only the pointer
Michael Niedermayer
git at videolan.org
Tue Oct 15 09:45:05 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 14 00:56:32 2013 +0200| [708b32b6f72c58ec1bf5fed6a227b3e48b971a05] | committer: Martin Storsjö
http: Check the auth string contents and not only the pointer
This makes sure we don't send the Except: 100-continue header
if no authentication credentials have been provided.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=708b32b6f72c58ec1bf5fed6a227b3e48b971a05
---
libavformat/http.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 2e43dd6..344507e 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -461,7 +461,8 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
* send Expect: 100-continue to get the 401 response including the
* WWW-Authenticate header, or an 100 continue if no auth actually
* is needed. */
- if (auth && s->auth_state.auth_type == HTTP_AUTH_NONE &&
+ if (auth && *auth &&
+ s->auth_state.auth_type == HTTP_AUTH_NONE &&
s->http_code != 401)
send_expect_100 = 1;
}
More information about the ffmpeg-cvslog
mailing list