psr7
psr7 copied to clipboard
bugfix: allow empty lists as header values
Closes #626
Description:
RFC 9110 (and its predecessors) do not forbid empty header field lists. While senders are explicitly prohibited from including empty list elements (e.g., consecutive commas), an entire list may be empty — as long as the field's grammar permits it (i.e., it's defined using #element, not 1#element).
This change removes the empty list validation in normalizeHeaderValue() and adds tests on the Request and Response construction paths.