Opened 3 years ago

Last modified 3 years ago

#6679 enhancement new

Make HTTPClientParser (and therefore HTTP11ClientProtocol) handle 'CONNECT' responses correctly

Reported by: akgood Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: jknight Branch:


With HTTP11ClientProtocol's support for persistent connections, it should be fairly simple to add support for HTTPS "CONNECT" proxying (e.g. #4969, #5324). Using HTTP11ClientProtocol directly (rather than the Agent interface that runs on top of it), you can:

  • create an HTTP11ClientProtocol instance connected to your proxy server
  • send a "CONNECT" request; wait for a 200 response
  • start TLS on the protocol's underlying transport
  • send the actual HTTPS request through

(see the attached for a quick-and-dirty implementation)

However, HTTPClientParser needs a small fix for this to work; currently it expects that a CONNECT response should include a body, but this is incorrect. I've attached a small patch for this.

Attachments (2) (1.5 KB) - added by akgood 3 years ago.
6679.patch (2.5 KB) - added by akgood 3 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 3 years ago by DefaultCC Plugin

  • Cc jknight added

Changed 3 years ago by akgood

Changed 3 years ago by akgood

Note: See TracTickets for help on using tickets.