This commit is contained in:
yhirose 2023-12-21 13:33:52 -05:00
parent 5b943d9bb8
commit b4748a226c

View file

@ -3860,11 +3860,7 @@ inline bool read_content_without_length(Stream &strm,
uint64_t r = 0;
for (;;) {
auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
if (n < 0) {
return false;
} else if (n == 0) {
return true;
}
if (n <= 0) { return true; }
if (!out(buf, static_cast<size_t>(n), r, 0)) { return false; }
r += static_cast<uint64_t>(n);