We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30ea714 commit 8dcb4a3Copy full SHA for 8dcb4a3
lib/std/http/protocol.zig
@@ -581,7 +581,7 @@ pub const HeadersParser = struct {
581
const nread = @min(conn.peek().len, data_avail);
582
conn.drop(@intCast(u16, nread));
583
r.next_chunk_length -= nread;
584
- } else {
+ } else if (out_avail > 0) {
585
const can_read = @intCast(usize, @min(data_avail, out_avail));
586
const nread = try conn.read(buffer[out_index..][0..can_read]);
587
0 commit comments