]> Cypherpunks repositories - gostls13.git/commit
net/http/httputil: make Switching Protocol requests (e.g. Websockets) cancelable
authorPierre Carru <pierre.carru@eshard.com>
Sun, 26 Apr 2020 09:11:35 +0000 (09:11 +0000)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Sun, 26 Apr 2020 09:26:10 +0000 (09:26 +0000)
commit8bcf2834afdf6a1f7937390903a41518715ef6f5
tree6bb3e48e81d1f481435f375bf42a55aac39ef5d6
parent09630172d45c09e150bd1329e37b74611d4af830
net/http/httputil: make Switching Protocol requests (e.g. Websockets) cancelable

Ensures that a canceled client request for Switching Protocols
(e.g. h2c, Websockets) will cause the underlying connection to
be terminated.

Adds a goroutine in handleUpgradeResponse in order to select on
the incoming client request's context and appropriately cancel it.

Fixes #35559

Change-Id: I1238e18fd4cce457f034f78d9cdce0e7f93b8bf6
GitHub-Last-Rev: 3629c78493f667703ea99f9f4db5e63ddaaa0e6b
GitHub-Pull-Request: golang/go#38021
Reviewed-on: https://go-review.googlesource.com/c/go/+/224897
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/net/http/httputil/reverseproxy.go
src/net/http/httputil/reverseproxy_test.go