mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Fix #1738
This commit is contained in:
parent
5b943d9bb8
commit
b4748a226c
1 changed files with 1 additions and 5 deletions
|
@ -3860,11 +3860,7 @@ inline bool read_content_without_length(Stream &strm,
|
||||||
uint64_t r = 0;
|
uint64_t r = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
|
auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
|
||||||
if (n < 0) {
|
if (n <= 0) { return true; }
|
||||||
return false;
|
|
||||||
} else if (n == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!out(buf, static_cast<size_t>(n), r, 0)) { return false; }
|
if (!out(buf, static_cast<size_t>(n), r, 0)) { return false; }
|
||||||
r += static_cast<uint64_t>(n);
|
r += static_cast<uint64_t>(n);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue