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

Possibly we should allow HTTP/1.1 CONNECT requests without a Host: header #105

Open
njsmith opened this issue Sep 30, 2020 · 2 comments
Open

Comments

@njsmith
Copy link
Member

njsmith commented Sep 30, 2020

According to the spec, all HTTP/1.1 requests MUST have a Host: header. Currently h11 enforces this.

@jab pointed me to this issue that go ran into in 2017 trying to enforce this, where apparently some widespread apps (like Facebook on iOS) do HTTP/1.1 CONNECT without a Host: header: golang/go#18215

It's not entirely clear if this is still relevant 3 years later, but since it's an obscure issue I wanted to make a note somewhere so we can (at the least) find it later.

@balki
Copy link

balki commented Mar 19, 2021

(slightly unrelated). I think the 'Request' class should take a 'host' parameter and include the header automatically. The library anyways checks for it and raises exception, so why not get the host and add the header automatically?

@sigmavirus24
Copy link

@balki probably better to open a separate issue for that as it's entirely orthogonal to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants