NetServices: When the response Content-Length is 0, do not expect a body.
Change-Id: Ia715b44289dc3c64c2b834f954421413cbc3593c
This commit is contained in:
parent
92357c131e
commit
6cf088266f
@ -950,6 +950,8 @@ BHttpSession::Request::ReceiveResult()
|
||||
try {
|
||||
auto contentLength = std::string(header->Value());
|
||||
fBodyBytesTotal = std::stol(contentLength);
|
||||
if (fBodyBytesTotal == 0)
|
||||
fNoContent = true;
|
||||
} catch (const std::logic_error& e) {
|
||||
throw BNetworkRequestError(__PRETTY_FUNCTION__, BNetworkRequestError::ProtocolError);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user