Home > Back-end >  Are CONNECT-based http proxies supposed to keep the TCP connection alive?
Are CONNECT-based http proxies supposed to keep the TCP connection alive?

Time:01-04

I wonder how are CONNECT-based http proxies working in terms of TCP. Do they keep the TCP connection alive or recreating one on every request?

CodePudding user response:

The CONNECT method works by having an initial HTTP handshake (CONNECT request and response) and after that passing all data through between client and server in both directions. Thus after the initial HTTP handshake it is basically a tunnel for a bidirectional byte stream, not something with requests and responses anymore. This tunnel is done only on shutdown of the underlying TCP connection.

  •  Tags:  
  • Related