-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: Allow upgrading connections even if DisableKeepAlives is set #36381
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
Labels
Milestone
Comments
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 4, 2020
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 4, 2020
Change https://golang.org/cl/213277 mentions this issue: |
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 6, 2020
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 7, 2020
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 7, 2020
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 7, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 7, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 7, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 9, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jan 9, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jun 12, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jun 12, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
nhooyr
added a commit
to nhooyr/go
that referenced
this issue
Jun 12, 2020
Fixes golang#36381 If one was using http.Transport with DisableKeepAlives and trying to upgrade a connection against net/http's Server, the Server would not allow a "Connection: Upgrade" header to be written and instead override it to "Connection: Close" which would break the handshake. This commit ensures net/http's Server does not override the connection header for successful protocol switch responses.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
If the http transport has DisableKeepAlives enabled, then connection upgrading does not work. See coder/websocket#185
If DisableKeepAlives is set, then the client sets
Connection: close
on every request which is completely fine.The problem is that when the server encounters such a request, it prevents any http.Handler from setting the
Connection
header.See
go/src/net/http/server.go
Line 1293 in 3a6cd4c
If that is changed to:
Then everything works fine.
The text was updated successfully, but these errors were encountered: