diff --git a/lib/remote/httpresponse.cpp b/lib/remote/httpresponse.cpp index ab7458655..fd7578ed0 100644 --- a/lib/remote/httpresponse.cpp +++ b/lib/remote/httpresponse.cpp @@ -208,6 +208,11 @@ bool HttpResponse::Parse(StreamReadContext& src, bool may_wait) lengthIndicator = Convert::ToLong(contentLengthHeader); } + if (!hasLengthIndicator && ProtocolVersion != HttpVersion10 && !Headers->Contains("transfer-encoding")) { + Complete = true; + return true; + } + if (hasLengthIndicator && src.Eof) BOOST_THROW_EXCEPTION(std::invalid_argument("Unexpected EOF in HTTP body"));