nghttpx: Don't add chunked encoded response body for HEAD request

This commit is contained in:
Tatsuhiro Tsujikawa 2016-05-14 17:47:58 +09:00
parent 5c82a36072
commit 796160cb77
1 changed files with 3 additions and 0 deletions

View File

@ -645,7 +645,10 @@ int htp_hdrs_completecb(http_parser *htp) {
resp.connection_close = true; resp.connection_close = true;
// transfer-encoding not applied to upgraded connection // transfer-encoding not applied to upgraded connection
downstream->set_chunked_response(false); downstream->set_chunked_response(false);
} else if (!downstream->expect_response_body()) {
downstream->set_chunked_response(false);
} }
if (upstream->on_downstream_header_complete(downstream) != 0) { if (upstream->on_downstream_header_complete(downstream) != 0) {
return -1; return -1;
} }