diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-08-29 08:46:22 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-08-29 08:46:22 +0000 |
commit | ace361b403a3308d3c94f05c3b099e3feabeb0fd (patch) | |
tree | 3806ed819190f9679bd63d731b36c091174b2c0c /lib/httpserver/HTTPResponse.cpp | |
parent | 161181f9e6f8bad2df42aa7a73ac620452663248 (diff) |
Whitespace, import order and comment fixes
Diffstat (limited to 'lib/httpserver/HTTPResponse.cpp')
-rw-r--r-- | lib/httpserver/HTTPResponse.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/httpserver/HTTPResponse.cpp b/lib/httpserver/HTTPResponse.cpp index f757a3c2..a7ef42ce 100644 --- a/lib/httpserver/HTTPResponse.cpp +++ b/lib/httpserver/HTTPResponse.cpp @@ -138,8 +138,7 @@ void HTTPResponse::SetContentType(const char *ContentType) // Function // Name: HTTPResponse::Send(IOStream &, bool) // Purpose: Build the response, and send via the stream. -// Optionally omitting the content. -// Created: 26/3/04 +// Created: 26/3/2004 // // -------------------------------------------------------------------------- void HTTPResponse::Send(bool OmitContent) @@ -184,6 +183,7 @@ void HTTPResponse::Send(bool OmitContent) // static is allowed to be cached for a day header += "\r\nCache-Control: max-age=86400"; } + if(mKeepAlive) { header += "\r\nConnection: keep-alive\r\n\r\n"; @@ -192,6 +192,7 @@ void HTTPResponse::Send(bool OmitContent) { header += "\r\nConnection: close\r\n\r\n"; } + // NOTE: header ends with blank line in all cases // Write to stream |