mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
7f92016e38
commit
157358c24f
@ -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"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user