修复http下载时Transfer-Encoding=chunked提前断开的情况
This commit is contained in:
parent
ef95f195f9
commit
62e6c7cb98
|
|
@ -1 +1 @@
|
||||||
Subproject commit 29a74a0032a05add2ffc750f90815bcaf461fd69
|
Subproject commit cf4e3425fbd1ac8f084bf08243d55c6151dc7bb2
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* MIT License
|
* MIT License
|
||||||
*
|
*
|
||||||
* Copyright (c) 2016 xiongziliang <771730766@qq.com>
|
* Copyright (c) 2016 xiongziliang <771730766@qq.com>
|
||||||
|
|
@ -236,7 +236,7 @@ void HttpClient::onSend() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HttpClient::onManager() {
|
void HttpClient::onManager() {
|
||||||
if (_aliveTicker.elapsedTime() > 3 * 1000 && _totalBodySize < 0) {
|
if (_aliveTicker.elapsedTime() > 3 * 1000 && _totalBodySize < 0 && !_chunkedSplitter) {
|
||||||
//如果Content-Length未指定 但接收数据超时
|
//如果Content-Length未指定 但接收数据超时
|
||||||
//则认为本次http请求完成
|
//则认为本次http请求完成
|
||||||
onResponseCompleted_l();
|
onResponseCompleted_l();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue