Impossible to use Net::HTTP option for ignoring proxy set in environment
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- networking
Research direction
Start at lib/httparty/connection_adapter.rb around line 73 and read the linked Net::HTTP.new documentation, focusing on how a nil proxy address affects proxy_from_env. Confirm the connection setup allows the option to disable environment proxy usage; done means the documented option works without the conditional blocking nil values.
Written by the indexing model from the issue text.
Description
L: 73
lib/httparty/connection_adapter.rb
def connection
host = clean_host(uri.host)
if options[:http_proxyaddr]
http = Net::HTTP.new(host, uri.port, options[:http_proxyaddr], options[:http_proxyport], options[:http_proxyuser], options[:http_proxypass])
else
http = Net::HTTP.new(host, uri.port)
end
http://ruby-doc.org/stdlib-2.1.2/libdoc/net/http/rdoc/Net/HTTP.html#method-c-new
one must pass nil to proxy address to disable the usage of proxy_from_env
Solution:
drop the if statement, Net::HTTP.new will accept nil's
- Dominant language
- Ruby
- Stars
- 5.9k
- Forks
- 973
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jnunemaker/httparty
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
jnunemaker/httparty#694 ·
-
curl logger formatter raise error: incompatible character encodings: UTF-8 and BINARY (ASCII-8BIT) Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
jnunemaker/httparty#848 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
jnunemaker/httparty#842 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
jnunemaker/httparty#840 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
jnunemaker/httparty#839 ·
All issues in jnunemaker/httparty
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100