diff --git a/src/kits/network/libnetservices2/HttpSession.cpp b/src/kits/network/libnetservices2/HttpSession.cpp index cb69e907f0..b9c926b37b 100644 --- a/src/kits/network/libnetservices2/HttpSession.cpp +++ b/src/kits/network/libnetservices2/HttpSession.cpp @@ -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); }