From: Aman Gupta <a...@tmm1.net>

This makes do_new_request fail early when dealing with a http/1.0 server, 
avoiding unnecessary warnings shown to the user.

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

diff --git a/libavformat/http.c b/libavformat/http.c
index c15ca522c4..213b6bb245 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))
-- 
2.14.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to