psr7
psr7 copied to clipboard
`MessageTrait`'s `normalizeValue()` incorrectly rejects empty lists
PHP version: 8.1
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).
How to reproduce Attempt to construct or add a header to a request or response using a field name with an empty array as its value.
Possible Solution #625