From efb7fce2b961590f57df75971d8f6cde603e4901 Mon Sep 17 00:00:00 2001 From: antao Date: Tue, 9 Oct 2018 19:06:44 +0800 Subject: [PATCH] Update HttpResponseImpl --- lib/src/HttpResponseImpl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/HttpResponseImpl.cc b/lib/src/HttpResponseImpl.cc index 9f330ae0..b668fc9b 100755 --- a/lib/src/HttpResponseImpl.cc +++ b/lib/src/HttpResponseImpl.cc @@ -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++) {