| 429 | } |
| 430 | |
| 431 | Result HttpIncomingMessage::consumeBodyBytes(size_t bytes) |
| 432 | { |
| 433 | if (bodyFramingKind != HttpBodyFramingKind::ContentLength) |
| 434 | { |
| 435 | return Result(true); |
| 436 | } |
| 437 | SC_TRY_MSG(bytes <= bodyBytesRemaining, "HttpIncomingMessage body exceeds Content-Length"); |
| 438 | bodyBytesRemaining -= bytes; |
| 439 | if (bodyBytesRemaining == 0) |
| 440 | { |
| 441 | bodyComplete = true; |
| 442 | } |
| 443 | return Result(true); |
| 444 | } |
| 445 | |
| 446 | Result HttpIncomingMessage::initBodyStream(AsyncBuffersPool& buffersPool, Function<Result()>&& onReadRequest) |
| 447 | { |