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: add Transport.OnProxyConnectResponse #54299

Closed
bradfitz opened this issue Aug 5, 2022 · 7 comments
Closed

net/http: add Transport.OnProxyConnectResponse #54299

bradfitz opened this issue Aug 5, 2022 · 7 comments

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Aug 5, 2022

We've had variants of this addition in our tree for a number of releases now:

tailscale@e6895e8 (corp CLA; same license as Go)

It adds a Transport.OnProxyConnectResponse hook:

	// OnProxyConnectResponse is called when the Transport gets an HTTP response from
	// a proxy for a CONNECT request. It's called before the check for a 200 OK response.
	// If it returns an error, the request fails with that error.
	OnProxyConnectResponse func(ctx context.Context, proxyURL *url.URL, connectReq *Request, connectRes *Response) error

Otherwise there's no way to find out how a CONNECT request to a proxy failed. (HTTP 403, etc)

/cc @neild

@gopherbot gopherbot added this to the Proposal milestone Aug 5, 2022
@rsc
Copy link
Contributor

rsc commented Oct 6, 2022

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Oct 12, 2022

Does anyone object to adding this API?

@rsc
Copy link
Contributor

rsc commented Oct 20, 2022

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Oct 26, 2022

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

@rsc rsc changed the title proposal: net/http: add Transport.OnProxyConnectResponse net/http: add Transport.OnProxyConnectResponse Oct 26, 2022
@rsc rsc modified the milestones: Proposal, Backlog Oct 26, 2022
@gopherbot
Copy link

Change https://go.dev/cl/447216 mentions this issue: net/http: add Transport.OnProxyConnectResponse

@gopherbot
Copy link

Change https://go.dev/cl/449215 mentions this issue: api/next/54299: add missing newline

gopherbot pushed a commit that referenced this issue Nov 9, 2022
Updates #54299.

Change-Id: I20a9191fa3c78810987ace69527d34091c4a42fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/449215
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/450515 mentions this issue: doc/go1.20: add release notes for net/http and net/http/httputil

gopherbot pushed a commit that referenced this issue Nov 15, 2022
For #41773
For #41773
For #50465
For #51914
For #53002
For #53896
For #53960
For #54136
For #54299

Change-Id: I729d5eafc1940d5706f980882a08ece1f69bb42c
Reviewed-on: https://go-review.googlesource.com/c/go/+/450515
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
mihaip added a commit to tailscale/tailscale that referenced this issue Feb 4, 2023
GetProxyConnectHeader (golang/go#41048) was upstreamed in Go 1.16 and
OnProxyConnectResponse (golang/go#54299) in Go 1.20, thus we no longer
need to guard their use by the tailscale_go build tag.

Updates #7123

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
mihaip added a commit to tailscale/tailscale that referenced this issue Feb 4, 2023
GetProxyConnectHeader (golang/go#41048) was upstreamed in Go 1.16 and
OnProxyConnectResponse (golang/go#54299) in Go 1.20, thus we no longer
need to guard their use by the tailscale_go build tag.

Updates #7123

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
tmm1 pushed a commit to fancybits/go that referenced this issue May 26, 2023
Fixes golang#54299

Change-Id: I3a29527bde7ac71f3824e771982db4257234e9ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/447216
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
(cherry picked from commit 2f4d5c3)
@dmitshur dmitshur modified the milestones: Backlog, Go1.20 Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants