projects
/
libav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Close connection on EOF
[libav.git]
/
libavformat
/
http.c
diff --git
a/libavformat/http.c
b/libavformat/http.c
index
1284c31
..
092151f
100644
(file)
--- a/
libavformat/http.c
+++ b/
libavformat/http.c
@@
-96,7
+96,7
@@
static int http_open_cnx(URLContext *h)
s->hd = hd;
if (http_connect(h, path, hoststr, auth, &location_changed) < 0)
goto fail;
s->hd = hd;
if (http_connect(h, path, hoststr, auth, &location_changed) < 0)
goto fail;
- if (
s->http_code == 303
&& location_changed == 1) {
+ if (
(s->http_code == 302 || s->http_code == 303)
&& location_changed == 1) {
/* url moved, get next */
url_close(hd);
if (redirects++ >= MAX_REDIRECTS)
/* url moved, get next */
url_close(hd);
if (redirects++ >= MAX_REDIRECTS)
@@
-221,6
+221,7
@@
static int http_connect(URLContext *h, const char *path, const char *hoststr,
"Range: bytes=%"PRId64"-\r\n"
"Host: %s\r\n"
"Authorization: Basic %s\r\n"
"Range: bytes=%"PRId64"-\r\n"
"Host: %s\r\n"
"Authorization: Basic %s\r\n"
+ "Connection: close\r\n"
"\r\n",
post ? "POST" : "GET",
path,
"\r\n",
post ? "POST" : "GET",
path,