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

Postman uses http_proxy by default if proxy is disabled in settings + does not parse it correctly #3667

Closed
mponton opened this issue Oct 24, 2017 · 2 comments
Assignees
Labels

Comments

@mponton
Copy link

mponton commented Oct 24, 2017

App Details:

Postman for Windows
Version 5.3.1
win32 6.1.7601 / x64

Issue Report:

  1. Did you encounter this recently, or has this bug always been there:
    It has always been there since I started using Postman App about 1-2 months ago.

  2. Expected behaviour:
    When Proxy is disabled in the settings (global and system), proxy should not be used.

  3. Console logs:
    Error: tunneling socket could not be established, cause=getaddrinfo ENOENT 10080:80

  4. Screenshots (if applicable)
    Not worth it. See above line.

I traced the above issue that prevented Postman to work to my http_proxy environment variable.

So the issue is twofold:

  1. I could not find any documentation whatsoever that Postman will use the http_proxy environment variable if set. I guess, it could be argued that I should expect that, but still, I think it should be made clear in the settings that if disabled here, the http_proxy environment variable will be picked up.

  2. My http_proxy was set to http_proxy=localhost:10080 which works with everything else (git, pip, etc...) but Postman does not parse it correctly. I think it splits on :, picks up the second part as the host and if the third part is not present, it use the default port 80, thus resulting in 10080:80.

If set to http_proxy=http://localhost:10080 it will be picked up correctly.

Now that I figured the issue out, it's easy to work around it. But I lost plenty of time troubleshooting this because the only symptom I had before I finally opened the console was this:

Could not get any response

There was an error connecting to https://hostname/path/to/some/api.

Why this might have happened:

The server couldn't send a response: Ensure that the backend is working properly
Self-signed SSL certificates are being blocked: Fix this by turning off 'SSL certificate verification' in Settings > General
Client certificates are required for this server: Fix this by adding client certificates in Settings > Certificates
Proxy configured incorrectly Ensure that proxy is configured correctly in Settings > Proxy
Request timeout: Change request timeout in Settings > General

Now that I'm done complaining...

Thanks for the great tool!

Cheers!

@prashantagarwal
Copy link

@mponton Thanks for opening this issue. Have you found a workaround for your issue or is there anything that you expected to be available in the Postman app itself.

@mponton
Copy link
Author

mponton commented Oct 25, 2017

Yes, the workaround for me is pretty simple, unset the http_proxy environnement variable. However I think the fact that it is used should be documented and also, the simple hostname:port format should be parsed correctly if you guys want to keep using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants