Class: HTTPX::Plugins::Proxy::HTTP::ProxyParser

Inherits:
Connection::HTTP1 show all
Defined in:
lib/httpx/plugins/proxy/http.rb

Direct Known Subclasses

ConnectProxyParser

Constant Summary

Constants inherited from Connection::HTTP1

Connection::HTTP1::CRLF

Constants included from Loggable

Loggable::COLORS

Instance Method Summary collapse

Methods inherited from Connection::HTTP1

#<<, #close, #consume, #dispatch, #empty?, #handle_error, #initialize, #on_complete, #on_data, #on_headers, #on_start, #on_trailers, #reenqueue!, #reset, #send

Methods included from Loggable

#log, #log_exception

Methods included from Callbacks

#emit, #on, #once

Constructor Details

This class inherits a constructor from HTTPX::Connection::HTTP1

Instance Method Details

#headline_uri(request) ⇒ Object



75
76
77
# File 'lib/httpx/plugins/proxy/http.rb', line 75

def headline_uri(request)
  request.uri.to_s
end

#set_request_headers(request) ⇒ Object



79
80
81
82
83
# File 'lib/httpx/plugins/proxy/http.rb', line 79

def set_request_headers(request)
  super
  request.headers["proxy-connection"] = request.headers["connection"]
  request.headers.delete("connection")
end