| 3510 | } |
| 3511 | |
| 3512 | inline void skip_content_with_length(Stream &strm, uint64_t len) { |
| 3513 | char buf[CPPHTTPLIB_RECV_BUFSIZ]; |
| 3514 | uint64_t r = 0; |
| 3515 | while (r < len) { |
| 3516 | auto read_len = static_cast<size_t>(len - r); |
| 3517 | auto n = strm.read(buf, (std::min)(read_len, CPPHTTPLIB_RECV_BUFSIZ)); |
| 3518 | if (n <= 0) { return; } |
| 3519 | r += static_cast<uint64_t>(n); |
| 3520 | } |
| 3521 | } |
| 3522 | |
| 3523 | inline bool read_content_without_length(Stream &strm, |
| 3524 | ContentReceiverWithProgress out) { |