From ff98c4acef6b4eb5cda343f07a1e0b61dc19a833 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Mon, 12 Nov 2018 09:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0Content-Length?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=AF=BC=E8=87=B4=E8=AF=AF=E5=88=A4=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpClient.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Http/HttpClient.cpp b/src/Http/HttpClient.cpp index d0b22125..3b010f89 100644 --- a/src/Http/HttpClient.cpp +++ b/src/Http/HttpClient.cpp @@ -153,11 +153,11 @@ int64_t HttpClient::onRecvHeader(const char *data, uint64_t len) { if(_parser["Content-Length"].empty()){ //没有Content-Length字段 - if(_parser.Content().empty()){ - //content长度为0,本次http请求结束 - onResponseCompleted_l(); - return 0; - } +// if(_parser.Content().empty()){ +// //content长度为0,本次http请求结束 +// onResponseCompleted_l(); +// return 0; +// } //如果http回复未声明Content-Length字段,但是却有content内容,那说明可能是个不限长度的content _totalBodySize = INT64_MAX; _recvedBodySize = 0;