http: Reset compressed header flag when starting to read a request
authorJacek Jendrzej <satbaby@kawaii.com>
Thu, 20 Jul 2017 11:46:46 +0000 (13:46 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 26 Sep 2017 10:36:21 +0000 (13:36 +0300)
This fixes redirects, where the original redirect response indicated
support for compression, while the actual redirected content didn't.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/http.c

index 00cf295..80c87f7 100644 (file)
@@ -682,6 +682,9 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
     s->willclose        = 0;
     s->end_chunked_post = 0;
     s->end_header       = 0;
+#if CONFIG_ZLIB
+    s->compressed       = 0;
+#endif
     if (post && !s->post_data && !send_expect_100) {
         /* Pretend that it did work. We didn't read any header yet, since
          * we've still to send the POST data, but the code calling this