mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-08 16:26:42 -04:00
parent
bea793d24f
commit
e19ae4e052
1 changed files with 5 additions and 0 deletions
|
|
@ -207,6 +207,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…
Reference in a new issue