Skip to content
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
Closed

Proxy authentication does not work for HTTPS. #132

vasiliyl opened this issue Jul 10, 2015 · 3 comments

Comments

@vasiliyl
Copy link

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
Copy link
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.

vasiliyl pushed a commit to vasiliyl/http-client that referenced this issue Jul 10, 2015
vasiliyl pushed a commit to vasiliyl/http-client that referenced this issue Jul 10, 2015
@vasiliyl
Copy link
Author

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
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants