HTTPeek is a tool for sending hand-crafted HTTP requests to web servers and examining (``peeking into'') the details of their response. It is designed to assist web server developers in testing the features of their servers which cannot easily be tested using an ordinary browser. Read the detailed description for more information. HTTPeek is written in Python and has a GUI built using the Tkinter toolset.
- Detailed description
- Complete instructions
HTTPeek depends only upon Python. It was developed and tested on NetBSD and OpenBSD and is fully expected to work on any POSIX system. It should work equally well on Windows, but this has not been tested. If you successfully run HTTPeek on Windows, I'd love to hear about it.
HTTPeek is distributed under a standard 3-clause BSD license. It's as free as software gets.
Download the latest version of HTTPeek, HTTPeek 0.2, which was released on April 19 2009.
You can also download older versions of HTTPeek, and see what has changed between versions, in the Old Versions / History section.
I wrote HTTPeek in order to test some features of my Python web server Comanche. Some parts of a web server - like handling standard GET requests or automatic directory indexing - are easy to test with a stock standard browser like Firefox. Some things are not quite as easy: most browsers will not show you the header a web server sends along with a website (links does, however, which has made it handy for Comanche testing). Some things are right out of the question: you can't ask Firefox to set a specific ``If-Range'' value in its request header, and Firefox will automatically follow a redirect without showing you the message it received. The need for a custom tool is clear and HTTPeek is intended to fill that role.
With HTTPeek, you can hand-craft every aspect of a standards compliant HTTP request. You can select the HTTP version to use, from HTTP/0.9, HTTP/1.0, or HTTP/1.1. You can select the HTTP method to use, from HEAD, GET, or POST. You can set an arbitrary number of (field,value) pairs in the request header - HTTPeek will automatically set some for you. You can include an entity in your request.
Once you've crafted your request, you can throw it at a webserver and get a response. HTTPeek will show you every aspect of the response. You can see the HTTP version the response complies with, the response status code and the descriptive string identifying that code. You can see all of the header fields in the response, and the complete response entity.
You can save both your crafted requests and received responses as plain text files in the same format they are sent over the network. If you've saved a request earlier, you can load that file if you want to send the exact same request out again.
Here's a screenshot of HTTPeek 0.1 running on NetBSD 3.0. It will look (cosmetically) different on Windows and Mac OS.
HTTPeek is a single Python source file and it requires no configuration. You can put the file anywhere you like, point your Python interpreter at it and go. HTTPeek's GUI is designed to be clear and intuitive, and anybody who understands the HTTP protocol should have no trouble in figuring things out (anybody who doesn't understand the protocol probably won't find any value in HTTPeek anyway).
The HTTPeek window is divided into four components: a network frame (top), a request construction frame (left), a response analysis frame (right) and a status/log frame (bottom). The features of each component are discussed here briefly. Also discussed are the file I/O options available through the menu bar at the top of the window.
The network frame contains 3 widgets allowing you to set the following network-related options:
- The hostname or dotted-quad IPV4 address of the host to send the request to.
- The port number which HTTPeek should attempt to connect to the above configured host on. The default is 80, which is the standard for HTTP traffic.
- The timeout duration (in seconds) for which HTTPeek will wait without having received any communication from a host before giving up.
The frame also contains 2 buttons, labeled "Send Request" and "Cancel". These buttons are self explanatory: the first sends the currently crafted request to the indicated host and waits for a response, the second aborts this process at whatever point it is currently at.
Request construction frame
This is where you set request related options. This description obviously needs fleshing out...
Response analysis frame
This is where you can see (but not change!) the details of the received response. This description obviously needs fleshing out...
This little frame just lets you see what HTTPeek is doing right this instant.
The menus provide some really simple functionality like saving and loading requests or responses to text files.
I am not currently aware of any network or protocol related bugs in HTTPeek, but there are a few subtle problems with the GUI:
- If you set the request method to anything other than "GET" while the HTTP version is set to HTTP/0.9 then the request method is automatically and instantly set back to "GET" (since HTTP/0.9 does not support any other method), but the GUI will not update to reflect this until you next hold the mouse cursor over the method drop down menu.
- The size of the frame for displaying header property values will not shrink to be smaller than the largest it has previously been, even if recent responses have had short enough headers that it should be able to shrink.
Old versions / History
The list below details all versions of HTTPeek which have ever been released, as well as summarising the changes between versions. You can also see how this webpage looked at the time of each release, which is handy for finding documentation for old releases.
HTTPeek 0.2 - April 19, 2008 (Download)
- Fixed some HTTP/0.9 issues
- Original release
Bug reports and suggestion for improvement of HTTPeek are very welcome: just email them to me. Full credit will be given on this page for bug reports, fixes, etc. Feel free to email me even just to let me know you think HTTPeek is neat, too.