summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-14 00:56:32 +0200
committerMartin Storsjö <martin@martin.st>2013-10-14 21:57:15 +0300
commit708b32b6f72c58ec1bf5fed6a227b3e48b971a05 (patch)
tree0bd3431caae098347d57124312c01bb0ebae50c4 /libavformat/http.c
parenta3fabc6cb389b14f73850033a55567efe725db31 (diff)
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@martin.st>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 2e43dd627d..344507ef8d 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;
}