nhttp: some minor code optimizations

Origin commit data
------------------
Commit: 2c3952cf42
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-08-19 (Tue, 19 Aug 2014)

Origin message was:
------------------
- nhttp: some minor code optimizations
This commit is contained in:
vanhofen
2014-08-19 12:51:23 +02:00
committed by [CST] Focus
parent 5a7dfcb2a4
commit f9a01915b4
2 changed files with 5 additions and 7 deletions

View File

@@ -248,9 +248,8 @@ std::string CyhookHandler::BuildHeader(bool cache) {
break;
}
// print Status-line
result = string_printf(HTTP_PROTOCOL " %d %s\r\nContent-Type: %s\r\n",httpStatus, responseString, ResponseMimeType.c_str());
log_level_printf(2, "Response: HTTP/1.1 %d %s\r\nContent-Type: %s\r\n",
httpStatus, responseString, ResponseMimeType.c_str());
result = string_printf(HTTP_PROTOCOL " %d %s\r\nContent-Type: %s\r\n", httpStatus, responseString, ResponseMimeType.c_str());
log_level_printf(2, "Response: HTTP/1.1 %d %s\r\nContent-Type: %s\r\n", httpStatus, responseString, ResponseMimeType.c_str());
switch (httpStatus) {
case HTTP_UNAUTHORIZED:
@@ -285,7 +284,7 @@ std::string CyhookHandler::BuildHeader(bool cache) {
// connection type
#ifdef Y_CONFIG_FEATURE_KEEP_ALIVE
if(keep_alive)
result += "Connection: keep-alive\r\n";
result += "Connection: keep-alive\r\n";
else
#endif
result += "Connection: close\r\n";