How do I debug the HTTP header fields being uploaded by a browser?
There’s many ways to do this: • If you are using Firefox, use the LiveHTTPHeaders extension; this let’s you see all the outgoing and incoming headers. • Create a debugging HTTP server: • Run the server with: HTTP::Daemon; modify the sample source provided in that link and add something like: print $r->as_string(); to print out all the header fields in the client’s request. • redirect the browser to use this daemon either by changing the url in the relevant form action or link href (e.g. href=”http://foo.com:6666/test.html”), or by using a proxy in your apache.conf file to redirect requests to the daemon’s port (6666 in this example). Now, when you access the daemon, it will print the HTTP fields to STDOUT. • Modify your apache conf file and print out specified header fields to the log file, using the {Field-Name}i syntax; e.g. “%{Cookie}i” to print the cookie. • Use a packet sniffer like ethereal, which is a free packet sniffer that works on Unix and Windows.