Class: HTTPX::Plugins::Proxy::HTTP::ConnectProxyParser
- Inherits:
-
ProxyParser
- Object
- Connection::HTTP1
- ProxyParser
- HTTPX::Plugins::Proxy::HTTP::ConnectProxyParser
- Defined in:
- lib/httpx/plugins/proxy/http.rb
Constant Summary
Constants inherited from Connection::HTTP1
Constants included from Loggable
Instance Attribute Summary collapse
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
Instance Method Summary collapse
Methods inherited from ProxyParser
Methods inherited from Connection::HTTP1
#<<, #close, #consume, #dispatch, #handle_error, #initialize, #on_complete, #on_data, #on_headers, #on_start, #on_trailers, #reenqueue!, #reset, #send
Methods included from Loggable
Methods included from Callbacks
Constructor Details
This class inherits a constructor from HTTPX::Connection::HTTP1
Instance Attribute Details
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
87 88 89 |
# File 'lib/httpx/plugins/proxy/http.rb', line 87 def pending @pending end |
Instance Method Details
#empty? ⇒ Boolean
98 99 100 101 |
# File 'lib/httpx/plugins/proxy/http.rb', line 98 def empty? @requests.reject { |r| r.verb == :connect }.empty? || @requests.all? { |request| !request.response.nil? } end |
#headline_uri(request) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/httpx/plugins/proxy/http.rb', line 89 def headline_uri(request) return super unless request.verb == :connect uri = request.uri tunnel = "#{uri.hostname}:#{uri.port}" log { "establishing HTTP proxy tunnel to #{tunnel}" } tunnel end |