what does “* Connection #0 to host example.com left intact” mean?

Adding a header “Connection: close” to your CURL command should solve the problem:

curl -v -H "Connection: close" https://example.com

Explanation can be found in this article:

Why is the connection left intact ?

The connection is left intact, because the server allowed it to stay
open and CURL no need to close it after you receive the response for
the request sent. That’s why the requests return ‘Connection:
keep-alive‘ headers when you expect ‘Connection:close‘

If you wanted to close the connection, then you could send CURL
request with ‘Connection: close‘ as shown below and you could see ‘*
Closing connection 0‘ in the response.

I hope the article https://www.sneppets.com/software/connection-0-to-host-localhost-left-intact/ helps you solve your problem.

Leave a Comment