Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely leaving out the version number in Accept header versioning schemes with strict: true does not result in a 406 #1206

Closed
suan opened this issue Nov 16, 2015 · 4 comments
Labels

Comments

@suan
Copy link
Contributor

suan commented Nov 16, 2015

When having an endpoint with:

version 'v1', vendor: 'foo.resource', using: header, cascade: false, strict: true
content_type :v1_resource, 'application/vnd.foo.resource-v1+json'
format :v1_resource

Any request with both "Accept: application/json" and "Accept: application/vnd.foo.resource-v1+json" headers present does not result in a 406, whereas the expected behavior is that it would be a 406, because of the strict option.

(When only the "Accept: application/vnd.foo.resource-v1+json" header is present it correctly responds with a 406)

@dblock
Copy link
Member

dblock commented Nov 16, 2015

That would be a problem. Could you please try this on HEAD? Some related issues may have been fixed.

If you have a moment, try to replicate this in a Grape test?

@dblock dblock added the bug? label Nov 16, 2015
@dblock
Copy link
Member

dblock commented Nov 16, 2015

And I mean specifically #1101.

@stjhimy
Copy link
Contributor

stjhimy commented Dec 10, 2015

This can be closed since #1222 confirmed it was fixed.

@dblock
Copy link
Member

dblock commented Dec 10, 2015

Closing.

@dblock dblock closed this as completed Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants