Fix reported content length for HttpResponse::endWithoutBody (#1557)
This commit is contained in:
+1
-1
@@ -420,7 +420,7 @@ public:
|
|||||||
/* End without a body (no content-length) or end with a spoofed content-length. */
|
/* 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) {
|
void endWithoutBody(std::optional<size_t> reportedContentLength = std::nullopt, bool closeConnection = false) {
|
||||||
if (reportedContentLength.has_value()) {
|
if (reportedContentLength.has_value()) {
|
||||||
//internalEnd({nullptr, 0}, reportedContentLength.value(), false, true, closeConnection);
|
internalEnd({nullptr, 0}, reportedContentLength.value(), false, true, closeConnection);
|
||||||
} else {
|
} else {
|
||||||
internalEnd({nullptr, 0}, 0, false, false, closeConnection);
|
internalEnd({nullptr, 0}, 0, false, false, closeConnection);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user