Skip to content

Commit

Permalink
fix: correctly use value instead of name in headerOpts (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunderw3k authored Dec 5, 2024
1 parent 5342bc5 commit 39e978b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/response.zig
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub const Response = struct {

pub fn headerOpts(self: *Response, name: []const u8, value: []const u8, opts: HeaderOpts) !void {
const n = if (opts.dupe_name) try self.arena.dupe(u8, name) else name;
const v = if (opts.dupe_name) try self.arena.dupe(u8, value) else name;
const v = if (opts.dupe_value) try self.arena.dupe(u8, value) else value;
self.headers.add(n, v);
}

Expand Down

0 comments on commit 39e978b

Please sign in to comment.