http.BodyWriter: handle EOF in chunkedSendFile, simplify

With these changes, the `zig std` command now works again and doesn't
trigger assertion failures or mess up the chunked transfer encoding.
This commit is contained in:
Isaac Freund
2025-08-16 13:11:19 +02:00
parent ce4e8a991f
commit 0cfd07bc86
3 changed files with 56 additions and 115 deletions

View File

@@ -907,7 +907,7 @@ pub const Request = struct {
return switch (r.transfer_encoding) {
.chunked => .{
.http_protocol_output = http_protocol_output,
.state = .{ .chunked = .init },
.state = .init_chunked,
.writer = .{
.buffer = buffer,
.vtable = &.{