diff options
author | Aman Gupta <aman@tmm1.net> | 2017-12-25 11:35:26 -0800 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2017-12-26 14:48:14 -0800 |
commit | 11f989945e1748fbe9b2a5abd68a25d3091acc5d (patch) | |
tree | 2e75cd68d27394ee0a2942d72351a2966c263359 /libavformat | |
parent | a232a72d77cf32766e7f42f892b983f5e496653f (diff) | |
download | ffmpeg-11f989945e1748fbe9b2a5abd68a25d3091acc5d.tar.gz |
avformat/http: avoid ff_http_do_new_request after http/1.0 response
This makes do_new_request fail early when dealing with a http/1.0 server, avoiding unnecessary "reconnecting" warnings shown to the user.
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/http.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |