Skip to content

Commit 8700d89

Browse files
authored
Merge pull request #3720 from hnakamur/add_content_length_only_when_non_zero_in_formatting_tests
Add Content-Length only when length is not zero in formatting tests
2 parents a44c779 + 00738f5 commit 8700d89

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/regression/regression_test.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static void update_content_length(std::vector<std::pair<std::string, std::string
259259
has_content_length = true;
260260
}
261261
}
262-
if (!has_content_length) {
262+
if (!has_content_length && length != 0) {
263263
headers.emplace_back(std::pair{"Content-Length", std::to_string(length)});
264264
}
265265
}

0 commit comments

Comments
 (0)