Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Interesting question –  at. Mar 1 '10 at 19:28

6 Answers 6

up vote 4 down vote accepted

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.

share|improve this answer
    
Wow - impressive tool! Thanks. –  rewbs Apr 4 '10 at 18:01

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
share|improve this answer

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

share|improve this answer
    
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 '10 at 15:34

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

share|improve this answer

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
share|improve this answer

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.

share|improve this answer
    
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 '10 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. –  John T Feb 28 '10 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 '10 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. –  John T Feb 28 '10 at 17:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.