Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

HTTP20Adapter doesn't convert headers from bytes to strings #324

Closed
KOLANICH opened this issue May 17, 2017 · 2 comments
Closed

HTTP20Adapter doesn't convert headers from bytes to strings #324

KOLANICH opened this issue May 17, 2017 · 2 comments

Comments

@KOLANICH
Copy link
Contributor

KOLANICH commented May 17, 2017

HTTP20Adapter doesn't convert headers and their keys from bytes to strings. It breaks compatibility with requests where headers labels are strings. Is this by design?

@KOLANICH KOLANICH changed the title Adapter doesn't converts headers from binary strings to strings HTTP20Adapter doesn't converts headers from binary strings to strings May 17, 2017
@KOLANICH KOLANICH changed the title HTTP20Adapter doesn't converts headers from binary strings to strings HTTP20Adapter doesn't converts headers from bytes to strings May 17, 2017
KOLANICH added a commit to KOLANICH-libs/pywikibot-core that referenced this issue May 17, 2017
KOLANICH added a commit to KOLANICH-libs/pywikibot-core that referenced this issue May 17, 2017
@Lukasa
Copy link
Member

Lukasa commented May 17, 2017

No, this is a newer problem that was introduced because we weren't paying enough attention. It should be a simple fix: simply pass the appropriate encoding argument to the HTTP2 connection class.

@Lukasa
Copy link
Member

Lukasa commented May 17, 2017

Ah, hang on, that's not it. The HTTP/1.1 stack appears to always provide bytes headers, which may be the actual problem here. We can probably just fix that, but it'll be a breaking change which I'm reluctant to just leap into. I'd rather fix it along with removing our custom parser in favor of h11.

@KOLANICH KOLANICH changed the title HTTP20Adapter doesn't converts headers from bytes to strings HTTP20Adapter doesn't convert headers from bytes to strings May 18, 2017
KOLANICH added a commit to KOLANICH-libs/hyper that referenced this issue Jul 4, 2017
@Lukasa Lukasa closed this as completed in 8345852 Jul 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants