[BugFix]be compatible with content length is zero (#50782)

Signed-off-by: zombee0 <ewang2027@gmail.com>
This commit is contained in:
zombee0 2024-09-06 16:37:08 +08:00 committed by GitHub
parent 8834cd818c
commit 12cae590bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ diff --git a/Net/src/HTTPResponse.cpp b/Net/src/HTTPResponse.cpp
+
+bool HTTPResponse::isPreAllocated()
+{
+ return _size >= getContentLength64();
+ return _size > 0 && _size >= getContentLength64();
+}
+
+void HTTPResponse::setBodyFilled(bool bodyFilled)