net/http: ProxyFromEnvironment no_proxy=localhost doesn't match empty Host #48325
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, also tested go 1.17.1
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Was expecting that because
no_proxy=localhost
is set, that the connection would obey and thus not CONNECT tunnel to the proxy. When a blank hostname is set, Go implicitly uses localhost. However, it seems I'm not able tono_proxy
localhost if the hostname is set to blank. Explicitly setting tolocalhost:9901
resolves the issue.What did you see instead?
The connection is attempting to use the proxy even though
no_proxy=localhost
.Originally filed with
grpc-go
grpc/grpc-go#4719 (comment) but was directed here.The text was updated successfully, but these errors were encountered: