52

What is the best way to view the HTTP response headers from a request against a particular URL? Telnet or is there some other really good command or tool?

bignose
  • 24,957
  • 12
  • 70
  • 100
Daniel Kivatinos
  • 21,262
  • 23
  • 57
  • 81
  • 8
    URLs don't have a "header" per se, requests and responses do. A request is issued against a particular resource, identified by a URL. Are you asking for a tool which shows the response headers returned from a particular request against some URL? – Rob Apr 30 '09 at 21:58
  • Thought so, but the wording wasn't quite clear. – Rob Apr 30 '09 at 22:00

16 Answers16

37

I find that Fiddler is my weapon of choice, although there are firefox plugins as well. Fiddler will show you all the HTTP Requests, their response status, all the headers, with different views (raw, hex, image), a timeline view, HTTPS Connects, everything.

Tom Ritter
  • 94,954
  • 29
  • 130
  • 168
  • 1
    In their site, they offer to install some addons but after virustotal test, there's a trojan hic http://www.virustotal.com/file-scan/report.html?id=e44e811581ff40382b7a0da6244f89918b4577253e5f3287ecc77c7012533cad-1320172710 – Nam G VU Nov 08 '11 at 04:03
35

I use the httpfox Firefox extension to view all HTTP requests and responses (including header and body) initiated from the web browser in the interval I specify (by pressing the start-recording and the stop-recording buttons). httpfox presents the data in a structured way in which I can quickly find the request I am interested in. It nicely complements LiveHTTPHeaders, because httpfox can view requests in the past as well.

pts
  • 64,123
  • 15
  • 92
  • 159
  • 8
    Don't need a plugin anymore, it's built-in: https://developer.mozilla.org/en-US/docs/Tools/Web_Console – odigity Oct 02 '14 at 20:37
23

On Linux I use:

wget -S [url] 

This gets the file and shows all headers sent by the server.

On Windows one can use the same command if Cygwin is installed; either on regular command prompt, if the environment variables were properly adjusted, or through the Cygwin command window.

BaCaRoZzo
  • 7,022
  • 6
  • 44
  • 72
Norbert Hartl
  • 9,675
  • 5
  • 33
  • 45
16
  • HttpFox for Firefox is pretty good. It will show the headers in real time. I prefer it to Live HTTP Headers.
  • Microsoft Fiddler for Internet Explorer is a web debugger that logs all HTTP traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP traffic, set breakpoints, and fiddle with incoming or outgoing data
  • Wireshark is a complete network protocol analyzer. It is good, but it might be overkill if HTTP headers is all that are required. It has problems if the client and server are on the same machine.
Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Thomas Bratt
  • 40,822
  • 34
  • 113
  • 133
12

Using a recent version of Firefox (19.0 in my case), going to menu Tools -> Web Developer -> Web Console (Ctrl + Shift + K on Windows) then refreshing the page produces a log of requests.

Then clicking on one of the first GET requests, the one with the URL of the page, opens a box with information about it, including request and response headers. It works out of the box, no need for fancy-shmancy add-ons any more.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Evgeni Sergeev
  • 18,558
  • 15
  • 94
  • 112
  • 1
    Web Console is nice but has several problem that I described in the second paragraph here: http://aegif-labo.blogspot.jp/2013/04/how-to-get-https-headers.html These are minor problems, so I agree that Web Console is the first tool to try. – Nicolas Raoul Apr 04 '13 at 07:22
6

Check out httpie, a very nice Python tool: enter image description here

You can use the --headers option to view only headers:

enter image description here

Mihai Rotaru
  • 1,803
  • 3
  • 26
  • 28
5

The Firebug addon for Firefox is the easiest way I think.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
ercu
  • 2,505
  • 1
  • 16
  • 14
5

For Internet Explorer, Fiddler will work. Or you can go all out with Wireshark.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
JP Alioto
  • 43,483
  • 5
  • 85
  • 112
2

If you are familiar with the developer tools in your browser, open the network tab on the developer tools, refresh the page, then click on the headers tab. The response headers will be listed. For instance this page sends this header:

HTTP/1.1 200 OK
Cache-Control: public, max-age=60
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Expires: Fri, 01 Mar 2013 02:00:20 GMT
Last-Modified: Fri, 01 Mar 2013 01:59:20 GMT
Vary: *
X-Frame-Options: SAMEORIGIN
Date: Fri, 01 Mar 2013 01:59:19 GMT
Content-Length: 13555
focused4success
  • 363
  • 2
  • 10
2

There is a better choice (in my point of view)

It's a Firefox extension calle HTTPfox. You can not only see the header but much more information. It´s a very complete HTTP analyzer

https://addons.mozilla.org/en-US/firefox/addon/6647

backslash17
  • 5,035
  • 4
  • 29
  • 46
0

burpsuite is a free tool, Java-based and runs on all platforms.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Martin
  • 1
0

There is a great addon/plugin/extension called Web Developer from Chris Pederick.

It works with Chrome, Firefox and Opera and has mighty dev functions and also a possibility to 'View Response Headers'. You can find it within the tab 'Information'.

sthag
  • 33
  • 1
  • 6
0

If you aren't looking to do it on your machine, you can use any number of online applications that do it for you.

  1. Rex Swain's HTTP viewer
  2. http://web-sniffer.net/: This one is a bit more flexible with regard to the app layer protocol (HTTP/S)
  3. Ask Apache: This one lets you customize your request a lot more.
sameers
  • 4,447
  • 2
  • 28
  • 42
0

If you are looking for an online tool View-Http-Request-and-Response-Headers is great

BT64
  • 9
  • 2
0

On Internet Explorer, inside Developer Tools (press F12), go to the Network tab and press "Start Capturing". Refresh the page, click on "Go to detailed view" and you will get a very nice overview of the request and response data.

0

I found a good tool to do it for Firefox called Live HTTP Headers.

Peter Mortensen
  • 28,342
  • 21
  • 95
  • 123
Daniel Kivatinos
  • 21,262
  • 23
  • 57
  • 81