Skip to content

Commit b4748a2

Browse files
committed
Fix #1738
1 parent 5b943d9 commit b4748a2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

httplib.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3860,11 +3860,7 @@ inline bool read_content_without_length(Stream &strm,
38603860
uint64_t r = 0;
38613861
for (;;) {
38623862
auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
3863-
if (n < 0) {
3864-
return false;
3865-
} else if (n == 0) {
3866-
return true;
3867-
}
3863+
if (n <= 0) { return true; }
38683864

38693865
if (!out(buf, static_cast<size_t>(n), r, 0)) { return false; }
38703866
r += static_cast<uint64_t>(n);

0 commit comments

Comments
 (0)