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

Unsupported HTTP versions should return 505 HTTP Version Not Supported #28

Open
ghost opened this issue Jun 25, 2012 · 4 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 25, 2012

Requests made with unsupported HTTP versions (HTTP/2.0) are accepted and processed as if they were HTTP 1.1. They should get 505 HTTP Version Not Supported responses instead. If HTTP 2.0 actually happens some day, there will be an issue with older snap servers claiming to support it, but not actually supporting it.

@hvr
Copy link
Member

hvr commented Jul 5, 2012

Btw, RFC 2145 (Use and Interpretation of HTTP Version Numbers) is relevant to this issue, as it describes in which cases a HTTP server is supposed to accept client requests with higher HTTP versions w.r.t. the version the HTTP server implements.

@gregorycollins
Copy link
Member

So looks like we should only respond with a 505 if the HTTP major version is >= 2.

@hvr
Copy link
Member

hvr commented Jul 5, 2012

maybe :-)

...but fwiw, when you send a faked GET / HTTP/2.0/Host: foobar request to Apache 2.2 (which is without doubt one of the mainstream web-server deployed), it happily responds with a HTTP/1.1 200 OK...

and I assume that HTTP 2.0 client will have to take this into account anyway; i.e. fallback to HTTP 1.1 if the server responds with a HTTP/1.1 response...

@ghost
Copy link
Author

ghost commented Jul 9, 2012

Oh, apache does flub this too. I appear to have forgotten to send a Host header when I tried it on apache before submitting this. Given that apache does it, that pretty much rules out any future practical concerns, since apache is too big to ignore.

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

2 participants