Skip to content

Commit

Permalink
Merge pull request #808 from voxik/ruby32-compat
Browse files Browse the repository at this point in the history
Convert proxy host value to nil if needed.
  • Loading branch information
geemus committed Jan 9, 2023
2 parents fe8ec7b + 45152e8 commit f785ab9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/excon/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ def setup_proxy
raise ArgumentError, "The `:ssl_proxy_headers` parameter should only be used with HTTPS requests."
end
if @data[:proxy][:scheme] == UNIX
# URI.parse might return empty string for security reasons.
@data[:proxy][:host] = nil if @data[:proxy][:host] == ""
if @data[:proxy][:host]
raise ArgumentError, "The `:host` parameter should not be set for `unix://` proxies.\n" +
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
Expand Down

0 comments on commit f785ab9

Please sign in to comment.