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

httparty doesn't respect http_proxy and https_proxy environment variables #184

Closed
tamird opened this issue Jan 23, 2013 · 3 comments
Closed

Comments

@tamird
Copy link

tamird commented Jan 23, 2013

This is due to the underlying implementation of Net::HTTP, but httparty should check for those environment variables in HTTParty::ConnectionAdapter.connection

@jnunemaker
Copy link
Owner

I know nothing about this type of stuff, so without a pull request + tests, there is not much I can do. Thanks for letting us know though. If you get a chance, I'd love to see some code.

@sodabrew
Copy link

sodabrew commented Feb 8, 2013

You can set these options on each query:
options[:http_proxyaddr], options[:http_proxyport], options[:http_proxyuser], options[:http_proxypass]

Is the request that those options should be automatically set from certain well-known environment variables? If so, which ones, and is that documented practice somewhere?

@tamird
Copy link
Author

tamird commented Feb 8, 2013

Apologies for not updating this thread. @sodabrew yes, the request is that these are auto-populated from http_proxy and https_proxy (these are well known and used by curl and wget, among others).

However, I looked at this upstream and this is fixed in Ruby 2.0 in Net::HTTP. My request to have it backported to 1.9 was rejected because it was deemed a new feature.

This issue is good to close.

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

3 participants