jshttp / negotiator

An HTTP content negotiator for Node.js
MIT License
320 stars 36 forks source link

Test that `Accept` parameter order is irrelevant #39

Closed ethanresnick closed 9 years ago

ethanresnick commented 9 years ago

The library is already agnostic about the order of parameters, which is great, but I just figured I'd add a test for that explicitly so that we don't get any regressions when we address #35 or in the future.

For reference, this is definitely correct behavior. RFC 2046 says straightforwardly that “The ordering of parameters is not significant.” (And my justification for referencing 2046 is that RFC 7231 says that “HTTP uses Internet media types [RFC2046] in the Content-Type and Accept header fields”.)

dougwilson commented 9 years ago

:+1:

ethanresnick commented 9 years ago

Cool :)