proposal: net/http: return error for proxy CONNECT errors #44118
Comments
I don't think |
Hi Sean, just to confirm, are you saying you think |
I was going to make an alternative suggestion in this issue that |
Dupe of #38143 |
let's keep it there |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?(actually using golang:latest eba5d0436b0b from dockerhub to compile)
go env
OutputWhat did you do?
main.go
What did you expect to see?
I would like to make a contribution to update the error returned on non 200 response on CONNECT request from https proxy to be a new error type such that I can interrogate the response from the proxy, instead of having to handle the error based on the text of the error message.
So I'm able to do something like:
Currently a basic error type is returned:
go/src/net/http/transport.go
Line 1719 in 8869086
I'm happy to raise a PR if this is something that would be accepted
What did you see instead?
Proxy Authentication Required
Response is nil
The text was updated successfully, but these errors were encountered: