Take the 2-minute tour ×

I noted that fiddler sends "connection:close" header when the client sends a CONNECT request to initiate secure connection along with the "200 connection established" message.

CONNECT request to a forward HTTP proxy over an SSL connection?

As explained in above question, the connection should be kept-alive between the client and the proxy so that the client can subsequently sent the actual request.

Why does fiddler sends the close header? wouldn't the client close the connection because of the header instead?.

enter image description here enter image description here

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Any Connection header in the successful response to the CONNECT request does not make any sense and gets ignored. CONNECT will establish a tunnel, which only ends with the end of the TCP connection. But a Connection header would make sense with an unsuccessful CONNECT, because with close the client would need to start a new TCP connection and with keep-alive (implicit with HTTP/1.1 response) it can reuse it with another request.

share|improve this answer

Connection: Close means that the connection will be closed after the request completes. Since the request in this scenario only completes when the HTTPS connection is closed, this is exactly the behavior you want for this sort of request.

Arguably, using Connection: keep-alive on a CONNECT request is invalid, since there's no legal way for the connection to be kept-alive after the tunnel is closed.

share|improve this answer

Your Answer


