aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/net/http_protocol_handler.inl
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-08-29 14:36:41 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-08-29 14:36:41 -0500
commit98af2e954b78dc7607d0236a9db84b2143a33a90 (patch)
tree4e9be3baf6c4693d4e79fa105991afddd6402494 /contrib/epee/include/net/http_protocol_handler.inl
parentMerge pull request #5707 (diff)
parentAdded support for "noise" over I1P/Tor to mask Tx transmission. (diff)
downloadmonero-98af2e954b78dc7607d0236a9db84b2143a33a90.tar.xz
Merge pull request #5793
bdfc63a Add ref-counted buffer byte_slice. Currently used for sending TCP data. (vtnerd) 3b24b1d Added support for 'noise' over I1P/Tor to mask Tx transmission. (vtnerd)
Diffstat (limited to 'contrib/epee/include/net/http_protocol_handler.inl')
-rw-r--r--contrib/epee/include/net/http_protocol_handler.inl9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl
index 790d0f3b1..19bdf4ff0 100644
--- a/contrib/epee/include/net/http_protocol_handler.inl
+++ b/contrib/epee/include/net/http_protocol_handler.inl
@@ -591,11 +591,12 @@ namespace net_utils
std::string response_data = get_response_header(response);
//LOG_PRINT_L0("HTTP_SEND: << \r\n" << response_data + response.m_body);
- LOG_PRINT_L3("HTTP_RESPONSE_HEAD: << \r\n" << response_data);
-
- m_psnd_hndlr->do_send((void*)response_data.data(), response_data.size());
+ LOG_PRINT_L3("HTTP_RESPONSE_HEAD: << \r\n" << response_data);
+
if ((response.m_body.size() && (query_info.m_http_method != http::http_method_head)) || (query_info.m_http_method == http::http_method_options))
- m_psnd_hndlr->do_send((void*)response.m_body.data(), response.m_body.size());
+ response_data += response.m_body;
+
+ m_psnd_hndlr->do_send(byte_slice{std::move(response_data)});
m_psnd_hndlr->send_done();
return res;
}