std.http.Server: use correct header for Transfer-Encoding

This commit is contained in:
jaina heartles 2023-08-09 22:40:51 -07:00 committed by Andrew Kelley
parent 7ab306d1f7
commit b835fd90ce

View File

@ -441,7 +441,7 @@ pub const Response = struct {
res.transfer_encoding = .{ .content_length = content_length };
} else if (has_transfer_encoding) {
const transfer_encoding = res.headers.getFirstValue("content-length").?;
const transfer_encoding = res.headers.getFirstValue("transfer-encoding").?;
if (std.mem.eql(u8, transfer_encoding, "chunked")) {
res.transfer_encoding = .chunked;
} else {