diff --git a/libavformat/http.c b/libavformat/http.c
index c15ca522c40807de4cb1b99e9e918b20eec15e5c..213b6bb245902a0674833877ab23546ba55bab25 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) == 0)
+                s->willclose = 1;
             while (!av_isspace(*p) && *p != '\0')
                 p++;
             while (av_isspace(*p))