Fix reported content length for HttpResponse::endWithoutBody (#1557)

This commit is contained in:
Alexey Timin
2023-03-06 11:36:00 +01:00
committed by GitHub
parent 09d2795852
commit 6243be0e9e
+1 -1
View File
@@ -420,7 +420,7 @@ public:
/* End without a body (no content-length) or end with a spoofed content-length. */
void endWithoutBody(std::optional<size_t> reportedContentLength = std::nullopt, bool closeConnection = false) {
if (reportedContentLength.has_value()) {
//internalEnd({nullptr, 0}, reportedContentLength.value(), false, true, closeConnection);
internalEnd({nullptr, 0}, reportedContentLength.value(), false, true, closeConnection);
} else {
internalEnd({nullptr, 0}, 0, false, false, closeConnection);
}