mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
* HTTPServer : keep response data for async_write()
This commit is contained in:
parent
205b61e4cf
commit
26440d94f1
|
@ -762,8 +762,8 @@ namespace http {
|
|||
reply.add_header("Content-Type", "text/html");
|
||||
reply.body = content;
|
||||
|
||||
std::string res = reply.to_string();
|
||||
boost::asio::async_write (*m_Socket, boost::asio::buffer(res),
|
||||
m_SendBuffer = reply.to_string();
|
||||
boost::asio::async_write (*m_Socket, boost::asio::buffer(m_SendBuffer),
|
||||
std::bind (&HTTPConnection::Terminate, shared_from_this (), std::placeholders::_1));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace http {
|
|||
boost::asio::deadline_timer m_Timer;
|
||||
char m_Buffer[HTTP_CONNECTION_BUFFER_SIZE + 1];
|
||||
size_t m_BufferLen;
|
||||
std::string m_SendBuffer;
|
||||
bool needAuth;
|
||||
std::string user;
|
||||
std::string pass;
|
||||
|
|
Loading…
Reference in a new issue