From 8d7266f2f7cd9be6abf4b1851c780a0c418da6cb Mon Sep 17 00:00:00 2001 From: Xie Han <63350856@qq.com> Date: Sun, 17 Mar 2024 00:11:22 +0800 Subject: [PATCH] Make it works with some ridiculous http servers. --- src/factory/HttpTaskImpl.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/factory/HttpTaskImpl.cc b/src/factory/HttpTaskImpl.cc index ffcd7711..ffd2291a 100644 --- a/src/factory/HttpTaskImpl.cc +++ b/src/factory/HttpTaskImpl.cc @@ -343,9 +343,7 @@ void ComplexHttpTask::check_response() if (this->state == WFT_STATE_SYS_ERROR && this->error == ECONNRESET) { /* Servers can end the message by closing the connection. */ - if (resp->is_header_complete() && - !resp->is_keep_alive() && - !resp->is_chunked() && + if (resp->is_header_complete() && !resp->is_chunked() && !resp->has_content_length_header()) { this->state = WFT_STATE_SUCCESS;