Closed CheungJ closed 8 years ago
This is true and so far has been by design, the reason being that as canned from my side has been used for testing I wanted the matching to be rather strict, as Accept
headers are something notoriously handled in odd ways except the bare minimum. I can see the reason so why one would like it to be less strict, if possible even resemble different kind of backends (aka Rails does different things than Spring etc.)
I'm happy to accept PRs changing this behaviour but would encourage it to be behind a command line option if at all possible.
I've created a PR for a "dumb" version of this issue: https://github.com/sideshowcoder/canned/pull/103
Awesome thanks for your work, I'm currently at a conference so I can't review but I will as soon as I'm back on Thursday. Thanks again cheers!
Cool, thanks! Enjoy the conference! :)
Thanks this is now available in 0.3.9! Great work!
Great! Thanks! I plan to contribute more in future.
Happy to hear! feel free to contact me on twitter https://twitter.com/ischi for quick things or we can jump into the gitter chat if need be 👍
The HTTP
Accept
header is a mechanism for the client to tell the server which media types are acceptable for the response.Canned only checks the first subtype in the
Accept
header, but if a file does not exist with the first subtype, it does not attempt to check for a file matching the following subtypes.