修复无Content-Length字段导致误判的bug
This commit is contained in:
parent
6c7a4eb037
commit
ff98c4acef
|
|
@ -153,11 +153,11 @@ int64_t HttpClient::onRecvHeader(const char *data, uint64_t len) {
|
||||||
|
|
||||||
if(_parser["Content-Length"].empty()){
|
if(_parser["Content-Length"].empty()){
|
||||||
//没有Content-Length字段
|
//没有Content-Length字段
|
||||||
if(_parser.Content().empty()){
|
// if(_parser.Content().empty()){
|
||||||
//content长度为0,本次http请求结束
|
// //content长度为0,本次http请求结束
|
||||||
onResponseCompleted_l();
|
// onResponseCompleted_l();
|
||||||
return 0;
|
// return 0;
|
||||||
}
|
// }
|
||||||
//如果http回复未声明Content-Length字段,但是却有content内容,那说明可能是个不限长度的content
|
//如果http回复未声明Content-Length字段,但是却有content内容,那说明可能是个不限长度的content
|
||||||
_totalBodySize = INT64_MAX;
|
_totalBodySize = INT64_MAX;
|
||||||
_recvedBodySize = 0;
|
_recvedBodySize = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue