lib/httpx/plugins/proxy/http.rb in httpx-0.6.7 vs lib/httpx/plugins/proxy/http.rb in httpx-0.7.0
- old
+ new
@@ -89,18 +89,16 @@
attr_reader :pending
def headline_uri(request)
return super unless request.verb == :connect
- uri = request.uri
- tunnel = "#{uri.hostname}:#{uri.port}"
+ tunnel = request.path
log { "establishing HTTP proxy tunnel to #{tunnel}" }
tunnel
end
def empty?
- @requests.reject { |r| r.verb == :connect }.empty? ||
- @requests.all? { |request| !request.response.nil? }
+ @requests.reject { |r| r.verb == :connect }.empty? || @requests.all? { |request| !request.response.nil? }
end
end
class ConnectRequest < Request
def initialize(uri, _options)