fixup! Bug 24793: Send the correct authorization HTTP header for basic auth.

merge-requests/3/head
Yawning Angel 5 years ago
parent f01e92dde7
commit da058cb180

@ -1,6 +1,7 @@
Changes in version 0.0.9 - UNRELEASED:
- Various meek_lite code cleanups and bug fixes.
- Bug 29077: uTLS for ClientHello camouflage (meek_lite).
- More fixes to HTTP Basic auth.
Changes in version 0.0.8 - 2019-01-20:
- Bug 24793: Send the correct authorization HTTP header for basic auth.

@ -93,7 +93,7 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
if s.haveAuth {
// SetBasicAuth doesn't quite do what is appropriate, because
// the correct header is `Proxy-Authorization`.
req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username+":"+s.password)))
req.Header.Set("Proxy-Authorization", "Basic " + base64.StdEncoding.EncodeToString([]byte(s.username+":"+s.password)))
}
req.Header.Set("User-Agent", "")

Loading…
Cancel
Save