New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy authentication does not work for HTTPS. #132

Closed
vasiliyl opened this Issue Jul 10, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@vasiliyl

vasiliyl commented Jul 10, 2015

When connecting to HTTPS via proxy Proxy-Authorization header is not sent.
Proxy authentication for HTTPS should work the same way as for HTTP.

I'm behind the proxy with authentication right now, https_proxy environment variable is set to http://user:pass@proxy:3128, and here is what I get with stack:

$ stack build        
Downloading nightly-2015-06-12 build plan ...ProxyConnectException "raw.githubusercontent.com" 443 (Left "StatusHeaders (Status {statusCode = 407, statusMessage = \"Proxy Authentication Required\"}) <...some more headers...>

Here is dump of stack's request:

CONNECT raw.githubusercontent.com:443 HTTP/1.1

Here is dump of request done with curl which works fine:

CONNECT raw.githubusercontent.com:443 HTTP/1.1\r\n
Host: raw.githubusercontent.com:443\r\n
Proxy-Authorization: Basic dXNlcjpwYXNz\r\n
User-Agent: curl/7.42.1\r\n
Proxy-Connection: Keep-Alive\r\n
@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Jul 10, 2015

Owner

I'm not well set up to test this. Would you be able to take a stab at this? The change should be pretty trivial, just modify the CONNECT call in Network.HTTP.Client.Manager to respect the proxy-authentication header in requestHeaders.

Owner

snoyberg commented Jul 10, 2015

I'm not well set up to test this. Would you be able to take a stab at this? The change should be pretty trivial, just modify the CONNECT call in Network.HTTP.Client.Manager to respect the proxy-authentication header in requestHeaders.

vasiliyl added a commit to vasiliyl/http-client that referenced this issue Jul 10, 2015

vasiliyl added a commit to vasiliyl/http-client that referenced this issue Jul 10, 2015

@vasiliyl

This comment has been minimized.

Show comment
Hide comment
@vasiliyl

vasiliyl Jul 10, 2015

I created merge request #133, it works for me. The code is trivial, but I'm new to haskell, please comment if there is a better solution.

vasiliyl commented Jul 10, 2015

I created merge request #133, it works for me. The code is trivial, but I'm new to haskell, please comment if there is a better solution.

snoyberg added a commit that referenced this issue Jul 12, 2015

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Jul 12, 2015

Owner

Merged to master, closing as resolved. If there are still issues, please report. Thanks for the PR!

Owner

snoyberg commented Jul 12, 2015

Merged to master, closing as resolved. If there are still issues, please report. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment