| ... | ... | @@ -534,9 +534,14 @@ pub const Request = struct { |
| 534 | 534 | const r = &request.server.reader; |
| 535 | 535 | if (keep_alive and request.head.keep_alive) switch (r.state) { |
| 536 | 536 | .received_head => { |
| 537 | | const reader_interface = request.reader() catch return false; |
| 538 | | _ = reader_interface.discardRemaining() catch return false; |
| 539 | | assert(r.state == .ready); |
| 537 | if (request.head.method.requestHasBody()) { |
| 538 | assert(request.head.transfer_encoding != .none or request.head.content_length != null); |
| 539 | const reader_interface = request.reader() catch return false; |
| 540 | _ = reader_interface.discardRemaining() catch return false; |
| 541 | assert(r.state == .ready); |
| 542 | } else { |
| 543 | r.state = .ready; |
| 544 | } |
| 540 | 545 | return true; |
| 541 | 546 | }, |
| 542 | 547 | .body_remaining_content_length, .body_remaining_chunk_len, .body_none, .ready => return true, |