1
Fork 0

net/http/header.ha: fix assertion

This commit is contained in:
Drew DeVault 2023-10-07 12:57:24 +02:00
parent 396d6caa76
commit d798088e9e

View file

@ -11,7 +11,7 @@ export type header = [](str, str);
// Adds a given HTTP header, which may be added more than once. The name should // Adds a given HTTP header, which may be added more than once. The name should
// be canonicalized by the caller. // be canonicalized by the caller.
export fn header_add(head: *header, name: str, val: str) void = { export fn header_add(head: *header, name: str, val: str) void = {
assert(len(name) > 1 && len(val) > 1); assert(len(name) >= 1 && len(val) >= 1);
append(head, (strings::dup(name), strings::dup(val))); append(head, (strings::dup(name), strings::dup(val)));
}; };