Browse code

http: Don't add a Range: bytes=0- header for POST

That header simply doesn't make sense in that context.

Signed-off-by: Martin Storsjö <martin@martin.st>

Martin Storsjö authored on 2011/11/10 18:09:26
Showing 1 changed files
... ...
@@ -317,7 +317,7 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
317 317
     if (!has_header(s->headers, "\r\nAccept: "))
318 318
         len += av_strlcpy(headers + len, "Accept: */*\r\n",
319 319
                           sizeof(headers) - len);
320
-    if (!has_header(s->headers, "\r\nRange: "))
320
+    if (!has_header(s->headers, "\r\nRange: ") && !post)
321 321
         len += av_strlcatf(headers + len, sizeof(headers) - len,
322 322
                            "Range: bytes=%"PRId64"-\r\n", s->off);
323 323
     if (!has_header(s->headers, "\r\nConnection: "))