If you are writing software that directly access HTTP servers, or even if you are making an ASP or VB web application, at some stage you may need to know what is being sent and returned in the HTTP headers.
First some background, skip this if you are an expert.
There are two types of http header to consider in a normal web application:
Request headers
These encode the resource the client App. is wanting, together with additional information
about what sort of data and HTTP version is acceptable. a common example would be:
GET / HTTP/1.1 <CRLF>
<CRLF>
<CRLF>
This request is asking for the main index page of the domain already connected through.
This is the minimum you can send, but it is better to include a little more information,
as modern servers that share one IP address between many WebSites could not tell which
WebSite you were wanting.
Here is an example that will work on far more servers:
GET / HTTP/1.1<CRLF>
Host: www.myweb.com <CRLF>
<CRLF>
<CRLF>
Now when the server gets the request, it knows which WebSite you are wanting, even if they
share the same IP.
Response headers
Old HTTP servers did not have to return any header at all! If the resource existed, it
would immediately follow.
These days most servers will return a header usually immediately followed by the data
itself, if it exists at the requested location. The response header can contain many types
of information, but from HTTP 1.0 onwards, the first line is always the response code. If
the request was successful and the document exists at the requested location then -
HTTP/1.x 200 OK <CRLF> would be returned on the first line.
Note: <CRLF> represents the Carriage return Line feed sequence, and is actually bytes 13 and 10 (decimal)
For an exhaustive explanation of the HTTP protocol goto http://www.faqs.org/rfcs/rfc2616
We make a tool called HTTP Interceptor that sits between you browser (or other client app), and the internet, that intercepts and displays the two way traffic between client and server. There is a minimal online help page for it at: interceptor help you can download the free version here
Basically, set up Interceptor and a browser as shown in the help file, and then press start - you should get the 'Active' message. If you use IE as your main browser, I recommend using NetScape 7 as your debugging browser because you can leave IE connected direct to the Internet, and have NetScape connected via its own proxy settings to Interceptor.
Now simply point your intercepted browser at a website, and you will see the response and requests fly by! If you have the URL tracking turned on, (which is the default) you will see in [square brackets] which request generated which response. This is useful because most browsers are multi threaded and the responses come back interspliced with each other - its a mess.
Here is a screen shot of what to expect:

This article will be updated over the next few weeks...
Author Mark Ravelle
CEO
Silicon Wold Ltd.
HTTP Interceptor. Download demo for free, and
register later to enable full functionality.
Download Interceptor.zip latest version Register for full version
For windows 98/2000/XP/NT4 (may work on NT3.51 and 95 but not supported)
Get online help for Interceptor
Leave the view http header diagnostics page and go home to Silicon Wold Ltd. www.siliconwold.com