Categories
Apache Debian

View HTTP Headers with Wget

View HTTP Headers with WGET
There are tools like curl, fiddler2, httpwatch, and of course wireshark that will show greater details, but if you don’t have these available, or are looking for a simple way to get debug http headers – you can use wget:


wget -SO- -T 5 -t 1 http://google.com

You can then search for whatever you may be looking for:


wget -SO- -T 5 -t 1 http://google.com 2>&1 | egrep "expression"



wget http response headers


Other useful wget commands for http debugging:

  • –keep-session-cookies
  • –save-cookies file.txt
  • –load-cookies file.txt
  • –http-user=user
  • –http-password=password
  • –no-cache
  • –user-agent=
  • –no-check-certificate
  • –secure-protocol=SSLv3|TLSv1

Wget Error Codes:

  • 0 No problems occurred.
  • 1 Generic error code.
  • 2 Parse error—for instance, when parsing command-line options, the .wgetrc or .netrc…
  • 3 File I/O error.
  • 4 Network failure.
  • 5 SSL verification failure.
  • 6 Username/password authentication failure.
  • 7 Protocol errors.
  • 8 Server issued an error response.

lower-numbered exit codes take precedence over higher-numbered ones, when multiple types of errors are encountered.
Note that you can also use Telnet to Troubleshoot headers too.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.