diff mbox

[FFmpeg-devel,3/3] avformat/http: fix ff_http_do_new_request hanging after http/1.0 response

Message ID 20171225193905.84024-3-ffmpeg@tmm1.net
State New
Headers show

Commit Message

Aman Karmani Dec. 25, 2017, 7:39 p.m. UTC
From: Aman Gupta <aman@tmm1.net>

Signed-off-by: Aman Gupta <aman@tmm1.net>
---
 libavformat/http.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index c15ca522c4..40dac1120c 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -917,6 +917,8 @@  static int process_line(URLContext *h, char *line, int line_count,
             }
             av_log(h, AV_LOG_TRACE, "HTTP version string: %s\n", version);
         } else {
+            if (av_strncasecmp(p, "HTTP/1.0", 8))
+                s->willclose = 1;
             while (!av_isspace(*p) && *p != '\0')
                 p++;
             while (av_isspace(*p))