Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(h2): preserve proxy authentication headers #2597

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

nox
Copy link
Contributor

@nox nox commented Jul 16, 2021

That Proxy-Authenticate and Proxy-Authorization are forbidden over h2
is not actually specified anywhere, plus h2 also supports CONNECT
requests, which are specifically made to do requests over a proxy,
and those proxies may require authentication, sometimes through
Proxy-Authorization.

Note that there is an openwebdocs project that just started to clear
up any MDN-induced confusion in implementations:

openwebdocs/project#43

Also, Daniel Stenberg (curl) also recently commented about
Proxy-Connection not being stripped out by curl, Hyper may want to
also remove Proxy-Connection from the list for that reason:

https://twitter.com/bagder/status/1415967315817082880

That Proxy-Authenticate and Proxy-Authorization are forbidden over h2
is not actually specified anywhere, plus h2 also supports CONNECT
requests, which are specifically made to do requests over a proxy,
and those proxies may require authentication, sometimes through
Proxy-Authorization.

Note that there is an openwebdocs project that just started to clear
up any MDN-induced confusion in implementations:

	openwebdocs/project#43

Also, Daniel Stenberg (curl) also recently commented about
Proxy-Connection not being stripped out by curl, Hyper may want to
also remove Proxy-Connection from the list for that reason:

	https://twitter.com/bagder/status/1415967315817082880
@nox
Copy link
Contributor Author

nox commented Jul 16, 2021

Cc @bagder

@bagder
Copy link
Contributor

bagder commented Jul 16, 2021

Proxy-Connection is certainly required for h1 connections over proxy, I doubt h2 proxies require it but that's just me guessing.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it does seem hyper was a little aggressive here, motivated by an MDN article. Thanks for the fix!

The HTTP/2 spec does directly spell out SHOULD remove Proxy-Connection. I imagine proxies that have been updated to use h2 will have to have dealt with that. If we get reports of it being a problem, we can consider then.

@seanmonstar seanmonstar merged commit 5243570 into master Jul 16, 2021
@seanmonstar seanmonstar deleted the nox/preserve-proxy-auth-headers branch July 16, 2021 22:48
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this pull request Jul 26, 2021
…eaders (hyperium#2597)

That Proxy-Authenticate and Proxy-Authorization are forbidden over h2
is not actually specified anywhere, plus h2 also supports CONNECT
requests, which are specifically made to do requests over a proxy,
and those proxies may require authentication, sometimes through
Proxy-Authorization.

Note that there is an openwebdocs project that just started to clear
up any MDN-induced confusion in implementations:

	openwebdocs/project#43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants