Commit 4e650ac
fix(proxy): send Proxy-Authorization when username has no password
httpProxyDialer only emitted the Basic credential header when the
url.Userinfo had a password component set. That dropped auth for
two legitimate cases allowed by RFC 7617: a proxy URL like
http://user@proxy/ (no colon, password unset), and an explicit
empty password http://user:@proxy/. Some corporate proxies are
configured exactly this way.
Send auth whenever a username is present, defaulting password to
the empty string if url.Userinfo didn't set one.
Upstream PR #977.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f57af74 commit 4e650ac
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
0 commit comments