Score:0

How do I get cURL (CLI) to close the connection made to a https server?

tv flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.