User Tools

Site Tools


curl:check_http_headers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
curl:check_http_headers [2019/11/27 00:04] – removed petercurl:check_http_headers [2020/09/25 12:57] (current) – created 192.168.1.1
Line 1: Line 1:
 +====== Curl - Check HTTP Headers ======
 +
 +<code bash>
 +curl -Ls -o /dev/null -D - sharewiz.net
 +</code>
 +
 +  * -L  Follow redirects
 +  * -s  Silent mode. Don't show progress meter or error messages. 
 +  * -D  Write the protocol headers to the specified file.
 +
 +
 +returns:
 +
 +<code bash>
 +HTTP/1.1 200 OK
 +Server: nginx
 +Date: Fri, 01 Jul 2016 23:24:21 GMT
 +Content-Type: text/html
 +Content-Length: 28277
 +Last-Modified: Thu, 30 Jun 2016 23:16:03 GMT
 +Connection: keep-alive
 +ETag: "5775a833-6e75"
 +Accept-Ranges: bytes
 +</code>
 +
 +----
 +
 +===== Alternative method =====
 +
 +<code bash>
 +curl --head http://www.sharewiz.net/
 +</code>
 +
 +returns:
 +
 +<code bash>
 +HTTP/1.1 200 OK
 +Server: nginx
 +Date: Fri, 01 Jul 2016 23:47:49 GMT
 +Content-Type: text/html
 +Content-Length: 28277
 +Last-Modified: Thu, 30 Jun 2016 23:16:03 GMT
 +Connection: keep-alive
 +ETag: "5775a833-6e75"
 +Accept-Ranges: bytes
 +</code>
 +
 +----
 +
 +===== Check any specific resource =====
 +
 +<code bash>
 +curl --head http://www.google.com/logo_plain.jpg
 +</code>
 +
 +----
 +
 +===== Dump document headers to a file =====
 +
 +<code bash>
 +curl --dump-header headers.txt http://www.google.com/
 +</code>
  
curl/check_http_headers.1574813072.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki