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

support a standard api for parsing media types #376

Merged
merged 10 commits into from
Oct 10, 2018

Conversation

mmerickel
Copy link
Member

No description provided.

src/webob/acceptparse.py Show resolved Hide resolved
@mmerickel
Copy link
Member Author

This is ready for review. I can remove the specificity stuff from AcceptOffer if desired... it's not used anywhere but isn't really hurting anything and the conceptual ordering is used in a lot of places. I chose to not add a separate PR for a bug fix with acceptable_offers where Accept: */* did not match a range-based offer.

Copy link
Member

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

src/webob/acceptparse.py Outdated Show resolved Hide resolved
see the multitude of reasons in
Pylons/pyramid#3326

the short answer is that they are fundamentally broken in that media
ranges cannot properly match against any accept header with q=0 content
@mmerickel
Copy link
Member Author

mmerickel commented Oct 10, 2018

This PR now incorporates #378 and removes media range support from parse_offer and subsequently acceptable_offers. I would recommend merging #378 first and then reviewing this PR afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants