8

I'm investigating differences in behaviour between a couple of Web servers. I need to see raw response data from the servers (i.e. before the response is de-chunked if it has "Transfer-Encoding:chunked" and before it is decompressed if it has "Content-Encoding:gzip").

I can find plenty of simple HTTP client that nearly do what I need (e.g. Poster, RESTClient), but they tend to decode the response one step too far.

Network analysers like Wireshark give me what I need but are a bit heavyweight. Telnet is my best bet so far, but is a bit too simplistic (actions like capturing data or entering requests are a bit laborious).

Can anyone recommend a good, lightweight tool for sending / viewing the raw data that constitute HTTP messages?

Edit: I should add that I'm on Windows. Also, the tool would need to work both with remote and local servers.

1
  • Interesting question
    – at.
    Mar 1, 2010 at 19:28

6 Answers 6

5

Fiddler is an "HTTP debugging proxy". It allows you to inspect HTTP messages, and also compose new HTTP messages. Each message can be viewed in multiple ways, such as raw text, and in a hex editor. A possible downside is that it requires the .NET Framework.

0
6

i vote for curl

$ curl -I http://www.amazon.com
HTTP/1.1 405 MethodNotAllowed
Date: Tue, 16 Mar 2010 01:21:45 GMT
Server: Server
Set-Cookie: skin=noskin; path=/; domain=.amazon.com; expires=Tue, 16-Mar-2010 01:21:45 GMT
x-amz-id-1: 02Q7DN8FGW708892524E
allow: POST, GET
x-amz-id-2: POduQxVVwgUXSZRQEM5nWw+9DDvV22s7
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=ISO-8859-1
3

Tamper Data is a great plugin for Firefox that shows all HTTP requests that the browser makes. It shows the headers, content and everything you would wanna know. If you have Firefox available to you, give it a squeeze.

alt text

1
  • Tamper data is a great tool - I use it a lot. But I think it doesn't quite cover the requirements in this case. For example, I can't see the raw bytes composing a chunked or a compressed response with tamper data. I'll upvote anyway when I have enough rep, because it is a very nice tool.
    – rewbs
    Feb 28, 2010 at 15:34
1

I just saw your question, I guess you can do it by a workload generator like httperf. It is a linux based tool that can be used in windows using Cygwin. You can change its code to see complete message, as far as i know, it shows the reply text when you use the command --print-reply body and the header when you use --print-reply header I hope it works works for you

1

Tcpdump is a simple plain text interface for a network sniffer. You can run it with simple filter rules to allow log or display the connection(s) you're interested in. It is also multi-platform, available for MS Windows (alternative version) as well as most Unix platforms. You can also save a log of packets with tcpdump, and then decode with wireshark later.

Sample usage:

tcpdump dst port 80
1

How about NirSoft SmartSniff?

SmartSniff is a network monitoring utility that allows you to capture TCP/IP packets that pass through your network adapter, and view the captured data as sequence of conversations between clients and servers. You can view the TCP/IP conversations in Ascii mode (for text-based protocols, like HTTP, SMTP, POP3 and FTP.) or as hex dump. (for non-text base protocols, like DNS)

alt text

SmartSniff is freeware. The zip file containing the tool as well as documentation is only 65kb.

4
  • Very nearly what I need! I'll upvote as soon as I have enough rep. As far as I can see, the features that are missing are: 1. I can't use it to compose my own requests (I'd still to use another tool like telnet for that, and then monitor the results in SmartSniff). 2. Out of the box, it doesn't seem to detect communication with a local server. I expect I need to set up a loopback device.
    – rewbs
    Feb 28, 2010 at 15:38
  • @rewbs It should be able to detect LAN communication. I just gave it a test run by pinging some local devices: i47.tinypic.com/ftn33n.png But you are correct, it does not allow you to compose requests unfortunately.
    – user1931
    Feb 28, 2010 at 16:10
  • Yes, LAN communication is fine. The problem is when the server and client are both on localhost (e.g. in a webserver development environment setup).
    – rewbs
    Feb 28, 2010 at 17:18
  • @rewbs I see what you mean. You can probably trick the program by mapping a second address to your NIC. Use the second address to access the web server.
    – user1931
    Feb 28, 2010 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .