From f70030fa5b51e486bf6f7f84da56c7b29a568ce9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 23 Jul 2023 14:20:30 -0700 Subject: [PATCH] http: Fix hang on early close. --- Common/Net/HTTPClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index 74d3784ab7..cbdb5686cb 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -371,7 +371,7 @@ int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector & while (true) { int sz = readbuf->TakeLineCRLF(&line); - if (!sz) + if (!sz || sz < 0) break; responseHeaders.push_back(line); }