Skip to content

Commit

Permalink
doc: getHeader need lowercase keys
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Jul 15, 2024
1 parent b77bada commit 11fa66a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/request.zig
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ pub fn setContentTypeFromFilename(self: *const Self, filename: []const u8) !void
}
}

/// Returns the header value of given key name. Returned mem is temp.
/// Do not free it.
/// Returns the header value of given key name.
/// NOTE that header-names are lowerased automatically while parsing the request.
/// so please only use lowercase keys!
/// Returned mem is temp. Do not free it.
pub fn getHeader(self: *const Self, name: []const u8) ?[]const u8 {
const hname = fio.fiobj_str_new(util.toCharPtr(name), name.len);
defer fio.fiobj_free_wrapped(hname);
Expand Down

0 comments on commit 11fa66a

Please sign in to comment.