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

proposal: net/http: add Transport.OnProxyConnectResponse #54299

Open
bradfitz opened this issue Aug 5, 2022 · 0 comments
Open

proposal: net/http: add Transport.OnProxyConnectResponse #54299

bradfitz opened this issue Aug 5, 2022 · 0 comments
Labels
Milestone

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

2 participants