Differences between revisions 21 and 22
Revision 21 as of 2009-09-20 22:13:20
Size: 1686
Editor: localhost
Comment: converted to 1.6 markup
Revision 22 as of 2009-10-12 08:09:44
Size: 1690
Editor: noodl
Comment: Fix a code section apparently broken by a moin update
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
{{{wget -S --spider URL {{{
wget -S --spider URL
Line 20: Line 21:
siege -g URL}}} siege -g URL
}}}

When debugging problems with your HTTP server, access to the raw HTTP request and response headers (and sometimes the entire request and response) can be invaluable. Here we list various tools that can help you see, at minimum, the HTTP response headers sent by the server, and sometimes also request headers and body content.

Shell

Various HTTP tools that may be available at the unix prompt:

wget -S --spider URL
lynx -head -dump URL
curl -I URL
HEAD URL
GET -de URL
w3m -dump_head URL
siege -g URL

Manually constructing requests

Using any standard telnet client, you can manually interact with an HTTP server and see the headers.

telnet server.example.com 80
HEAD /dir/page.html HTTP/1.1
Host: server.example.com

Press enter twice at the end.

Tracing headers over SSL

The openssl command can be used to open an SSL connection over which normal HTTP requests can be entered.

openssl s_client -connect secure.example.com:443
.. lots and lots of output ..
HEAD / HTTP/1.1
Host: secure.example.com

Press enter twice at the end.

Alternatively, ssldump and wireshark can use the private key file to decrypt live or recorded SSL traffic.

WatchingHttpHeaders (last edited 2009-10-12 08:09:44 by noodl)