diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index f2e8442df0a..521958c8fed 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -691,8 +691,10 @@ PoolByteArray HTTPClient::read_response_body_chunk() { body_left -= rec; } } - if (err != OK) + if (err != OK) { + ret.resize(_offset); break; + } } }