Class: HTTPX::Plugins::Proxy::HTTP::ProxyParser
- Inherits:
-
Connection::HTTP1
- Object
- Connection::HTTP1
- HTTPX::Plugins::Proxy::HTTP::ProxyParser
- Defined in:
- lib/httpx/plugins/proxy/http.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Connection::HTTP1
Connection::HTTP1::CRLF, Connection::HTTP1::MAX_REQUESTS
Constants included from Loggable
Instance Attribute Summary
Attributes inherited from Connection::HTTP1
Instance Method Summary collapse
Methods inherited from Connection::HTTP1
#<<, #close, #consume, #dispatch, #empty?, #exhausted?, #handle_error, #initialize, #interests, #on_complete, #on_data, #on_headers, #on_start, #on_trailers, #ping, #reset, #send, #timeout
Methods included from Loggable
Methods included from Callbacks
Constructor Details
This class inherits a constructor from HTTPX::Connection::HTTP1
Instance Method Details
#headline_uri(request) ⇒ Object
80 81 82 |
# File 'lib/httpx/plugins/proxy/http.rb', line 80 def headline_uri(request) request.uri.to_s end |
#set_protocol_headers(request) ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/httpx/plugins/proxy/http.rb', line 84 def set_protocol_headers(request) extra_headers = super proxy_params = .proxy extra_headers["proxy-authorization"] = "Basic #{proxy_params.token_authentication}" if proxy_params.authenticated? extra_headers["proxy-connection"] = extra_headers.delete("connection") if extra_headers.key?("connection") extra_headers end |