fix: added Keep-Alive header

This commit is contained in:
Marcel Gebhardt
2018-09-25 09:23:55 +02:00
committed by Marcel Gebhardt
parent 3b62ca2637
commit 93e5be72ed

View File

@@ -40,6 +40,7 @@ func WrapDialContext(dialContext DialContext, proxyAddress, proxyUsername, proxy
debugf("ntlm> NTLM negotiate message: '%s'", base64.StdEncoding.EncodeToString(negotiateMessage)) debugf("ntlm> NTLM negotiate message: '%s'", base64.StdEncoding.EncodeToString(negotiateMessage))
header := make(http.Header) header := make(http.Header)
header.Set("Proxy-Authorization", fmt.Sprintf("NTLM %s", base64.StdEncoding.EncodeToString(negotiateMessage))) header.Set("Proxy-Authorization", fmt.Sprintf("NTLM %s", base64.StdEncoding.EncodeToString(negotiateMessage)))
header.Set("Proxy-Connection", "Keep-Alive")
connect := &http.Request{ connect := &http.Request{
Method: "CONNECT", Method: "CONNECT",
URL: &url.URL{Opaque: addr}, URL: &url.URL{Opaque: addr},