Skip to content

net/http: add Transport.OnProxyConnectResponse #54299

Closed
@bradfitz

Description

@bradfitz

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions