html tool

2018年11月9日星期五

curl http返回,超时为000



shell curl 取得HTTP返回的状态码

curl -I -m 10 -o /dev/null -s -w %{http_code} ww.163.cn
但是返回的是000,go了一下

https://segmentfault.com/q/1010000008718022

因为指定了选项-w %{http_code},当域名不存在或连接超时时,返回的值即为000

没有评论:

发表评论