How to capture HTTP header data
This article explains how to capture or trace HTTP Headers (HTTP trace) using Interceptor.
If you are writing software that directly access HTTP servers, oreven if you are creating a PHP, ASP or Java web application, at some stage you may need to knowwhat 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 returnLine feed sequence, and is actually bytes 13 and 10 (decimal)
For an exhaustive explanation of the HTTP protocol goto
We make a tool called HTTP Interceptor that sits between you browser (orother client app), and the internet, that intercepts and displays the two way trafficbetween client and server. There is a minimal online help page for it at:
Basically, set up Interceptor and a browser as shown in the help file, andthen press start - you should get the 'Active' message. If you use IE as your mainbrowser, I recommend using NetScape 7 as your debugging browser because you canleave IE connected direct to the Internet, and have NetScape connected via its own proxysettings to Interceptor.
Now simply point your intercepted browser at a website, and you will seethe response and requests fly by! If you have the URL tracking turned on, (which is thedefault) you will see in [square brackets] which request generated which response. This isuseful because most browsers are multi threaded and the responses come back intersplicedwith each other - its a mess.
Here is a screen shot of what to expect:

Author Mark Ravelle - CEO Siliconwold.com
HTTP Interceptor. Download demo for free, andregister later to enable full functionality.
For windows 98/2000/XP/NT4 (may work on NT3.51 and 95 but not supported)
Get online help for Interceptor
Check out our other products
View http view asp view JavaScript. View http headers. View interactive and view dataheaders. View responses. Header view application.