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

Enhance parsing of Accept-Language quality values #2547

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spaceone
Copy link
Contributor

@spaceone spaceone commented Dec 3, 2018

Parse HTTP syntax correctly:
Accept-Language: en-US ; foo=bar; q=2.0 was not possible and is now possible.

@bdarnell
Copy link
Member

bdarnell commented Dec 7, 2018

Thanks for your contribution! Can you add a simple test case for this functionality to web_test.py?

@spaceone
Copy link
Contributor Author

@bdarnell Added a test case with all tests passing.

tornado/web.py Outdated Show resolved Hide resolved
@bdarnell
Copy link
Member

Accept-language parsing was improved in #3068 so I think this PR is no longer needed; if there was something here that's not covered by that PR feel free to open a new one.

@bdarnell bdarnell closed this Aug 28, 2022
@spaceone
Copy link
Contributor Author

no, this is an additional MR on top of #3068 - and already rebased up on it. please reopen.

@bdarnell bdarnell reopened this Aug 28, 2022
@bdarnell
Copy link
Member

Ah, OK. In that case my comment about the deeply-nested generator expression inside a for loop expression still stands.

The following cases were not possible:
"Accept-Language: en-US; foo=bar; q=0.9"
"Accept-Language: en-US; q = 0.9"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants