From 5c62887890151bc598aa13cf38b440ab3bdaecbc Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Mon, 7 Jan 2019 14:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84HttpRequester?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpRequester.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/HttpRequester.cpp b/src/Http/HttpRequester.cpp index c99c3631..0fb7ed01 100644 --- a/src/Http/HttpRequester.cpp +++ b/src/Http/HttpRequester.cpp @@ -36,8 +36,8 @@ HttpRequester::~HttpRequester(){ int64_t HttpRequester::onResponseHeader(const string &status,const HttpHeader &headers) { _strRecvBody.clear(); - //后续全部是content - return -1; + //无Content-Length字段时默认后面没有content + return 0; } void HttpRequester::onResponseBody(const char *buf,size_t size,size_t recvedSize,size_t totalSize) {