Update HttpResponseImpl

This commit is contained in:
antao 2018-10-09 19:06:44 +08:00
parent bc0a844892
commit efb7fce2b9
1 changed files with 5 additions and 1 deletions

View File

@ -349,7 +349,6 @@ void HttpResponseImpl::appendToBuffer(MsgBuffer* output) const
}
}
_headers["Date"]=getHttpFullDate(trantor::Date::date());
for (auto it = _headers.begin();
it != _headers.end();
@ -359,6 +358,11 @@ void HttpResponseImpl::appendToBuffer(MsgBuffer* output) const
output->append(it->second);
output->append("\r\n");
}
//output Date header
output->append("Date: ");
output->append(getHttpFullDate(trantor::Date::date()));
output->append("\r\n");
if(_cookies.size() > 0) {
for(auto it = _cookies.begin(); it != _cookies.end(); it++) {