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

Why uppercase HTTP headers? #813

Closed
gwillem opened this issue Mar 4, 2016 · 5 comments
Closed

Why uppercase HTTP headers? #813

gwillem opened this issue Mar 4, 2016 · 5 comments
Labels

Comments

@gwillem
Copy link
Contributor

gwillem commented Mar 4, 2016

What is the reason aiohttp converts HTTP headers to uppercase? It is ok according to RFC, but virtually every other client and server uses capitalized headers.

I am mimicking regular browsers so I want to stay as close to their behaviour as possible.

@asvetlov
Copy link
Member

asvetlov commented Mar 7, 2016

It was easy to implement.
Upper-cased names are here from very beginning and 100% compatible with the standard.
Also using upper-case is faster thanks to str.upper(). For CamelCase new function is needed.

@gwillem
Copy link
Contributor Author

gwillem commented Mar 7, 2016

Ok!

@gwillem gwillem closed this as completed Mar 7, 2016
@gwillem gwillem mentioned this issue Mar 7, 2016
2 tasks
@DriverX
Copy link

DriverX commented Mar 18, 2016

It was easy to implement.

How?
upstr() encapsulated into https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/protocol.py#L611 and change behavior is too hard (too many overrides).

@asvetlov
Copy link
Member

I mean we've decided to use upper case at very beginning. Period.

HTTP2 prescribes lower-cased header names BTW.

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants