gpt4 book ai didi

curl - "* Connection #0 to host example.com left intact"是什么意思?

转载 作者:行者123 更新时间:2023-12-04 06:59:31 83 4
gpt4 key购买 nike

我正在使用 curl 和 curl -v https://example.com
最后它说 * Connection #0 to host example.com left intact .这意味着什么?

最佳答案

向 CURL 命令添加标题“Connection: close”应该可以解决问题:

curl -v -H "Connection: close" https://example.com
可以在 this article 中找到解释:
为什么连接完好无损?

The connection is left intact, because the server allowed it to stayopen and CURL no need to close it after you receive the response forthe 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 CURLrequest with ‘Connection: close‘ as shown below and you could see ‘*Closing connection 0‘ in the response.


希望文章 https://www.sneppets.com/software/connection-0-to-host-localhost-left-intact/帮助您解决您的问题。

关于curl - "* Connection #0 to host example.com left intact"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61880928/

83 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com