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

uppercase 'Authorization' header #68

Open
kmccarthy opened this issue May 3, 2011 · 1 comment
Open

uppercase 'Authorization' header #68

kmccarthy opened this issue May 3, 2011 · 1 comment
Labels

Comments

@kmccarthy
Copy link

Integrated python-oauth2 with twisted framework. Twisted sets all headers names to lowercase while the oauth module expects uppercase 'Authorization'. Rather that a hack to revert the header before calling oauth routimes (from_request for example) any suggestions how to better handle this?

@dieselmachine
Copy link

Hilarious that this hasn't been touched in a year, despite still being an issue.

Nginx normalizes all headers to the HTTP_*** format, meaning that by the time wsgi/django even has a chance to look at them, the original casing has been lost. This means, in order to prepare headers for oauth2, we need to strip the prefix, replace the underscores with hyphens, and then capitalize the first letter of every word.

This is very silly, seeing as http headers are defined by spec as being case-insensitive. It would be great if oauth2 didn't force users to coerce their data into a specific casing. All header checks should be case insensitive.

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