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
Next revision
Previous revision
curl:check_http_headers [2016/07/01 23:25] petercurl:check_http_headers [2020/09/25 12:57] (current) – created 192.168.1.1
Line 1: Line 1:
 ====== Curl - Check HTTP Headers ====== ====== Curl - Check HTTP Headers ======
  
-<code>+<code bash>
 curl -Ls -o /dev/null -D - sharewiz.net curl -Ls -o /dev/null -D - sharewiz.net
 </code> </code>
Line 10: Line 10:
  
  
-Returns:+returns:
  
-<code>+<code bash>
 HTTP/1.1 200 OK HTTP/1.1 200 OK
 Server: nginx Server: nginx
Line 23: Line 23:
 Accept-Ranges: bytes Accept-Ranges: bytes
 </code> </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.1467415501.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki