mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 15:14:08 +00:00
doc: getHeader need lowercase keys
This commit is contained in:
parent
b77bada381
commit
11fa66a31c
1 changed files with 4 additions and 2 deletions
|
@ -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.
|
/// Returns the header value of given key name.
|
||||||
/// Do not free it.
|
/// 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 {
|
pub fn getHeader(self: *const Self, name: []const u8) ?[]const u8 {
|
||||||
const hname = fio.fiobj_str_new(util.toCharPtr(name), name.len);
|
const hname = fio.fiobj_str_new(util.toCharPtr(name), name.len);
|
||||||
defer fio.fiobj_free_wrapped(hname);
|
defer fio.fiobj_free_wrapped(hname);
|
||||||
|
|
Loading…
Add table
Reference in a new issue