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

net/http: various HTTP/0.9 bugs #16197

Closed
bradfitz opened this issue Jun 27, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@bradfitz
Copy link
Member

commented Jun 27, 2016

As noted in an email from @regilero, Go's "support" for HTTP/0.9 is quite inconsistent.

The HTTP/0.9 "spec" is at https://www.w3.org/Protocols/HTTP/AsImplemented.html

Notably, requests look like "GET /path", with no version number. Go's server rejects those with "HTTP/1.1 400 Bad Request". But if you make a request like:

GET /path HTTP/0.9\r\n
\r\n

... then Go replies like it's an HTTP/0.9 request (without response headers), even though that's not a valid HTTP/0.9 request at all. (it has a version number, and Go waits for the second \r\n before replying, where HTTP/0.9 requests only have a single \r\n).

So we should probably just kill all HTTP/0.9 support.

@regilero also mentioned there might be some cache poisoning or request smuggling possibilities here, but I don't see how. It seems to only affect the person making the bogus request. But there's also zero clients in the world who make these bogus requests, so it's easier to just delete support.

@bradfitz bradfitz added the NeedsFix label Jun 27, 2016

@bradfitz bradfitz added this to the Go1.7Maybe milestone Jun 27, 2016

@bradfitz bradfitz self-assigned this Jun 27, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Jun 27, 2016

CL https://golang.org/cl/24505 mentions this issue.

@gopherbot gopherbot closed this in 3e9d6e0 Jun 27, 2016

@golang golang locked and limited conversation to collaborators Jun 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.