Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: add support for parameters in content negotiation (#2678)
* ✨ feat: add support for parameters in content negotiation Attempts to approach the level of support offered by express, but behavior may differ in unusual corner cases. Some key behaviors from Express that are implemented: - If an offer does not have every parameter listed in the given Accept, it is rejected. - Parameters do not affect specificity. - In a given specificity, more parameters gives greater precedence - Parameters are unordered - Matching is case-insensitive - Surrounding quotes for parameter values are stripped - If an Accept type specifies a parameter more than once, the last value provided is taken. - Parameters after q are not processed. https://www.rfc-editor.org/rfc/rfc9110#name-parameters * doc: properly attribute reader.go for validHeaderFieldByte * fix: remove underscores from fuzz test name * test(forEachParameter): improve coverage * doc: add comment clarifying RFC 9110 non-compliance for corner case
- Loading branch information