ResponseHeader.get should return mutable slice

This commit is contained in:
Karl Seguin
2025-04-16 16:54:28 +08:00
parent 613904e3a4
commit 4a6bf38666

View File

@@ -1439,7 +1439,7 @@ pub const ResponseHeader = struct {
// Stored header has already been lower-cased // Stored header has already been lower-cased
// `name` parameter should be passed in lower-cased // `name` parameter should be passed in lower-cased
pub fn get(self: *const ResponseHeader, name: []const u8) ?[]const u8 { pub fn get(self: *const ResponseHeader, name: []const u8) ?[]u8 {
for (self.headers.items) |h| { for (self.headers.items) |h| {
if (std.mem.eql(u8, name, h.name)) { if (std.mem.eql(u8, name, h.name)) {
return h.value; return h.value;