From 0f51ac56c0903948be4b489b790bf45855fe572c Mon Sep 17 00:00:00 2001 From: an-tao <20741618@qq.com> Date: Fri, 1 Mar 2019 18:30:51 +0800 Subject: [PATCH] Fix a new bug in last commit --- lib/src/HttpResponseImpl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/HttpResponseImpl.cc b/lib/src/HttpResponseImpl.cc index 5ba59274..25b630e7 100755 --- a/lib/src/HttpResponseImpl.cc +++ b/lib/src/HttpResponseImpl.cc @@ -359,7 +359,8 @@ std::shared_ptr HttpResponseImpl::renderToString() const return _httpString; } } - auto httpString = std::make_shared(256, '\0'); + auto httpString = std::make_shared(); + httpString->reserve(256); if (!_fullHeaderString) { makeHeaderString(httpString);