Jay Taylor's notes
back to listing indexHuman readable format for http headers with tcpdump
[web search]
I would like to view the HTTP headers sent from Apache (listening on port 80) to Tomcat (on port 4080) in a Linux machine. According to Wikipedia,
I've tried some variations of the following
The result was always the same - a strange mix of gibberish and English words (e.g. How can I view the headers in a human-readable format? |
|||||||||
|
|||||||||
Here's a one-liner I came up with for displaying request and response HTTP headers using
It limits cuts the packet off at 10Kb and only knows GET, POST and HEAD commands, but that should be enough in the majority of cases. EDIT: modified it to get rid of the buffers at every step to make it more responsive. Needs Perl and stdbuf now though, so use the original version if you don't have those:
Some explanations:
|
|||||||||||||||||||||
|
You can get something close to what you want by using
Remember to use Alternatively you could use |
|||||||||||||||||||||||||||||||||
|
Try to use http://justniffer.sourceforge.net/ It is better tool or Wireshark with "Follow TCP Flow" option, there are just many better options than tcpdump to see headers (requests/responses) |
|||
Your Answer
asked |
2 years ago |
viewed |
18802 times |
active |
Technology | Life / Arts | Culture / Recreation | Science | Other | ||
---|---|---|---|---|---|---|