diff options
author | Guillaume LE VAILLANT <glv@posteo.net> | 2017-07-05 15:27:13 +0200 |
---|---|---|
committer | Guillaume LE VAILLANT <glv@posteo.net> | 2017-07-05 15:39:50 +0200 |
commit | 13a8d64fe654e35fdd928199e440cfc4142be16e (patch) | |
tree | ff6f3b88a9a4e7e58e2de1e2fa510358527fdda9 /contrib/epee/include/net/http_protocol_handler.inl | |
parent | Merge pull request #2130 (diff) | |
download | monero-13a8d64fe654e35fdd928199e440cfc4142be16e.tar.xz |
epee: don't send the body of the response to a HEAD HTTP request
According to the HTTP spec: "The HEAD method is identical to GET
except that the server MUST NOT return a message-body in the
response".
Diffstat (limited to 'contrib/epee/include/net/http_protocol_handler.inl')
-rw-r--r-- | contrib/epee/include/net/http_protocol_handler.inl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl index d9eca2479..c92a13bcc 100644 --- a/contrib/epee/include/net/http_protocol_handler.inl +++ b/contrib/epee/include/net/http_protocol_handler.inl @@ -547,7 +547,7 @@ namespace net_utils LOG_PRINT_L3("HTTP_RESPONSE_HEAD: << \r\n" << response_data); m_psnd_hndlr->do_send((void*)response_data.data(), response_data.size()); - if(response.m_body.size()) + if(response.m_body.size() && (query_info.m_http_method != http::http_method_head)) m_psnd_hndlr->do_send((void*)response.m_body.data(), response.m_body.size()); return res; } |