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
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 behave strangely (buggy?) in Express, so we only explicitly handle what RFC-9110 allows, which is a quoted value (right side of the equal sign) Behaviors were mostly reverse engineered from res.format in Express. https://www.rfc-editor.org/rfc/rfc9110#name-parameters
- Loading branch information