diff --git a/lib/src/HttpResponseImpl.cc b/lib/src/HttpResponseImpl.cc index 05213909..34cd6339 100755 --- a/lib/src/HttpResponseImpl.cc +++ b/lib/src/HttpResponseImpl.cc @@ -364,12 +364,13 @@ std::shared_ptr HttpResponseImpl::renderToString() const { if (_expriedTime >= 0) { - if (_httpString && _datePos != std::string::npos) + if (_datePos != std::string::npos) { bool isDateChanged = false; auto newDate = getHttpFullDate(trantor::Date::now(), &isDateChanged); { std::lock_guard lock(*_httpStringMutex); + assert(_httpString); if (isDateChanged) { _httpString = std::make_shared(*_httpString);