0

cURL doesn't seem to care about closing the connection to a server even when I include the "Connection: close" header?

It respects the header for http, but not for https, seems like?

curl -v -H "Connection: close" -o nul --http2 http://www.google.com results in

* Closing connection 0

but curl -v -H "Connection: close" -o nul --http2 http://www.google.com results in

* Connection #0 to host www.google.com left intact

I get that in isolation this isn't an issue, but I want to test session resumption in a custom https server, for which I need to request the url twice in succession, with the connecting being closed in between the two, which doesn't seem to happen; something along the lines of:

curl -v -k --http2 --tls-max 1.3 -o nul -H "Connection: close" <url> <url>

and in the logs of the second request, I see "Re-using existing connection! (#0) with host ", which I do not want.

LaRuim
  • 1

0 Answers0