Skip to content

Commit

Permalink
Fix #1738
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Dec 21, 2023
1 parent 5b943d9 commit b4748a2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b4748a2

Please sign in to comment.