We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48430dd commit 3df64afCopy full SHA for 3df64af
1 file changed
src/HTTPMessage.cpp
@@ -204,10 +204,10 @@ bool HTTPMessage::parseBody() {
204
parseErrorStr = std::format("Content-Length ({}) is greater than remaining bytes ({})", hlenstr, bytesRemaining());
205
return false;
206
} else if (contentLen == 0) {
207
- parseErrorStr = "Content-Length is zero";
208
- return false;
+ // Nothing to read, which is fine
+ return true;
209
} else {
210
- // Otherwise, we ca probably trust Content-Length is valid and read the specificed number of bytes
+ // Otherwise, we can probably trust Content-Length is valid and read the specificed number of bytes
211
dataLen = contentLen;
212
}
213
0 commit comments