Merge pull request #2151
13a8d64f
epee: don't send the body of the response to a HEAD HTTP request (Guillaume LE VAILLANT)
This commit is contained in:
commit
6244c782de
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue