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

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

Direct Known Subclasses

ConnectProxyParser

Constant Summary

Constants inherited from Channel::HTTP1

Channel::HTTP1::CRLF

Constants included from Loggable

Loggable::COLORS

Instance Method Summary collapse

Methods inherited from Channel::HTTP1

#<<, #close, #consume, #dispatch, #empty?, #handle_error, #initialize, #on_body, #on_headers_complete, #on_message_begin, #on_message_complete, #on_trailer_headers_complete, #reenqueue!, #reset, #send

Methods included from Loggable

#log

Methods included from Callbacks

#emit, #on, #once

Constructor Details

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

Instance Method Details

#headline_uri(request) ⇒ Object



72
73
74
# File 'lib/httpx/plugins/proxy/http.rb', line 72

def headline_uri(request)
  request.uri.to_s
end

#set_request_headers(request) ⇒ Object



76
77
78
79
80
# File 'lib/httpx/plugins/proxy/http.rb', line 76

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