The HTTP proxy server's dispatch method decodes the Proxy-Authorization Basic credential using base64.URLEncoding, but RFC 7617 specifies that Basic authentication uses standard Base64 encoding (base64.StdEncoding). The two encodings differ in their use of +/ vs -_ characters, so any credential containing 0xff or other bytes that encode to / or + in standard Base64 will fail to decode with URLEncoding, causing valid authentication attempts to always be rejected with 407. Additionally, the "Basic " scheme prefix check was case-sensitive, but RFC 7235 section 2.1 specifies that auth-scheme is case-insensitive. Fix both issues by switching to base64.StdEncoding and using strings.ToLower for the scheme comparison. |
||
|---|---|---|
| .. | ||
| server.go | ||
| server_test.go | ||
| server_test.py | ||
| test.crt | ||
| test.key | ||