Commit 54d0ef17 authored by Aman Gupta's avatar Aman Gupta

avformat/http: return EOF from ff_http_do_new_request if previous response said Connection:close

This fixes a deadlock when using the hls demuxer's new http_persistent feature
to stream a youtube live stream over HTTPS. The youtube servers are http/1.1
compliant, but return a "Connecton: close". Before this commit, the demuxer
would attempt to send a new request on the partially shutdown connection and
cause a deadlock in the tls protocol.
Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
parent 1f0eaa02
......@@ -327,6 +327,9 @@ int ff_http_do_new_request(URLContext *h, const char *uri)
if (ret < 0)
return ret;
if (s->willclose)
return AVERROR_EOF;
s->end_chunked_post = 0;
s->chunkend = 0;
s->off = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment