整理代码

This commit is contained in:
xiongziliang
2020-04-04 19:55:11 +08:00
parent 67f4ca4b83
commit 11420b868b
11 changed files with 14 additions and 18 deletions

View File

@@ -398,7 +398,6 @@ static const string kContentType = "Content-Type";
static const string kContentLength = "Content-Length";
static const string kAccessControlAllowOrigin = "Access-Control-Allow-Origin";
static const string kAccessControlAllowCredentials = "Access-Control-Allow-Credentials";
static const string kServerName = SERVER_NAME;
void HttpSession::sendResponse(const char *pcStatus,
bool bClose,
@@ -426,7 +425,7 @@ void HttpSession::sendResponse(const char *pcStatus,
HttpSession::KeyValue &headerOut = const_cast<HttpSession::KeyValue &>(header);
headerOut.emplace(kDate, dateStr());
headerOut.emplace(kServer, kServerName);
headerOut.emplace(kServer, SERVER_NAME);
headerOut.emplace(kConnection, bClose ? "close" : "keep-alive");
if(!bClose){
string keepAliveString = "timeout=";