summaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorDuncan Salerno <duncan.salerno@gmail.com>2012-09-22 21:17:36 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-09-23 02:36:08 +0200
commit48cf0f1c18f2f91363601c94177c71bc3ac13b8e (patch)
treef10db5390d4cbf2db0dd5f1fd652041df484ddef /libavformat/http.c
parent0a8cc1179a61f586a365b684470239cfcfd70ab2 (diff)
http: only send range header when necessary
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 85ed7a5c81..669fdf408d 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -411,7 +411,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
if (!has_header(s->headers, "\r\nAccept: "))
len += av_strlcpy(headers + len, "Accept: */*\r\n",
sizeof(headers) - len);
- if (!has_header(s->headers, "\r\nRange: ") && !post)
+ if (!has_header(s->headers, "\r\nRange: ") && !post && s->off > 0)
len += av_strlcatf(headers + len, sizeof(headers) - len,
"Range: bytes=%"PRId64"-\r\n", s->off);