curl -I http://xxxx.xxx
-I
选项会告诉 cURL 只获取响应头,不获取响应体。输出将类似于:
HTTP/1.1 200 OK
Server: nginx/1.14.2
Date: Thu, 12 Dec 2019 16:00:00 GMT
Content-Type: text/html
Content-Length: 612
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT
Connection: keep-alive
ETag: "56152bc1-264"
Accept-Ranges: bytes