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 RFC-7617 #540

Closed
kxepal opened this issue Oct 1, 2015 · 5 comments
Closed

Support RFC-7617 #540

kxepal opened this issue Oct 1, 2015 · 5 comments
Assignees
Labels

Comments

@kxepal
Copy link
Member

kxepal commented Oct 1, 2015

RFC-7617 updates the rules of Basic Authentication: now it gained support of optional charset parameter which defined the expected encoding of user credential. Previously, RFC-2616 only allowed to use ISO-8859-1 here, but de facto all major browsers and servers already provided support of UTF-8 in-place of ISO-8859-1. Now this behaviour get legalized and we can support it.

@asvetlov
Copy link
Member

asvetlov commented Jan 8, 2016

charset is WWW-Authenticate parameter, we don't rely on it in client code.
@kxepal do you suggest just switching encoding default to 'utf-8' in https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/helpers.py#L33 line?

@kxepal
Copy link
Member Author

kxepal commented Jan 8, 2016

I actually found this support a bit complicated. aiohttp indeed doesn't handles WWW-Authenticate header in anyway, so the idea was to just introduce some callback that will handle it and provide basic auth credentials. Like what browsers do. Quite useful, but...

Spec tells that default should remains latin1 while the only valid charset parameter is UTF-8. Ok. But, most of servers ignores all the specs and uses UTF-8 by default (however, we still have deviations) while actually nobody follows the new rules now. So implementing RFC-7617 support right actually breaks everything and we're returning to direct specification of what charset to use. What makes this feature a little bit, but completely broken.

Basically, situation here is the same as with http client from stdlib (and related discussion about on python dev ml): doing right things makes life harder. Changing the default is from the same opera: UTF-8 is good intention, but it's not what spec tells us to do. Sad panda.

@asvetlov
Copy link
Member

asvetlov commented Jan 8, 2016

Let's close the issue then.

@kxepal
Copy link
Member Author

kxepal commented Jan 8, 2016

Ok with that.

@kxepal kxepal closed this as completed Jan 8, 2016
@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

2 participants