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

Accept more flexible content-type specification #1490

Merged
merged 2 commits into from Apr 28, 2016

Conversation

Projects
None yet
2 participants
@necaris

necaris commented Apr 25, 2016

Closes #1489. The Content-Type header can contain option information in a semicolon-separated portion after the main content-type string. This PR allows those more elaborate headers to be accepted by the server as valid serialization formats.

To make this more extensible in future, it might be a good idea to use a helper function such as that available in Werkzeug to handle this.

Rami Chowdhury added some commits Apr 25, 2016

Rami Chowdhury
Accept more flexible content-type specification
Closes #1489. The `Content-Type` header can contain option information
in a semicolon-separated portion after the main content-type string. This
PR allows those more elaborate headers to be accepted by the server as
valid serialization formats.

To make this more extensible in future, it might be a good idea to use a
helper function such as that [available in
Werkzeug](http://werkzeug.pocoo.org/docs/0.11/http/#werkzeug.http.parse_options_header)
to handle this.
Rami Chowdhury
Refactor mimetype acceptance
Rather than using a regular expression, use a dictionary to check
acceptable content-types.
@kwmsmith

This comment has been minimized.

Member

kwmsmith commented Apr 28, 2016

@necaris LGTM.

@kwmsmith kwmsmith merged commit 571fb0c into blaze:master Apr 28, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 89.245%
Details

@necaris necaris deleted the necaris:more-flexible-mimetype-regex branch Jun 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment