Browse Source

Enable Http/1.1 persistence connection

This enables reusing existing TCP connection instead of opening a new connection
for every request
adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
f34dfca5e6
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/base/http/connection.cpp

4
src/base/http/connection.cpp

@ -101,12 +101,10 @@ void Connection::read()
if (acceptsGzipEncoding(result.request.headers["accept-encoding"])) if (acceptsGzipEncoding(result.request.headers["accept-encoding"]))
resp.headers[HEADER_CONTENT_ENCODING] = "gzip"; resp.headers[HEADER_CONTENT_ENCODING] = "gzip";
resp.headers[HEADER_CONNECTION] = "close"; resp.headers[HEADER_CONNECTION] = "keep-alive";
sendResponse(resp); sendResponse(resp);
m_receivedData = m_receivedData.mid(result.frameSize); m_receivedData = m_receivedData.mid(result.frameSize);
m_socket->close();
} }
break; break;

Loading…
Cancel
Save