The Pitfalls of Debugging HTTP
Thursday, 22 May 2008
Some folks at work were having problems debugging HTTP with LWP ’s command-line GET utility; it turned out that it was inserting Link headers — HTTP headers, mind you — for each HTML <link>
element present.
Blurgh.
This brought to mind some other peculiarities that can make debugging HTTP more complex and REALLY ANNOYING…
Curl automagically adds a Pragma: no-cache
to requests, so that you don’t have to worry about scaling the Web or getting decent performance.
LiveHTTPHeaders shows you headers, but through the lens of Mozilla’s header parsing and processing, not what’s on the wire.
Even Wireshark can’t be completely trusted; it will remove the \r\n
from the Content-Length header (because it’s parsing the message for its own purposes), making you think that the sender has header delimitation bugs.
Anybody have another?
All of this is why I tend to use telnet when debugging HTTP. Sometimes tcpflow helps too.
25 Comments
Steve Clay said:
Thursday, May 22 2008 at 10:36 AM
integralsource said:
Thursday, May 22 2008 at 10:52 AM
Jim Dabell said:
Thursday, May 22 2008 at 11:19 AM
PJ said:
Friday, May 23 2008 at 1:33 AM
Mike Amundsen said:
Friday, May 23 2008 at 1:36 AM
chrism said:
Friday, May 23 2008 at 2:09 AM
Edward O'Connor said:
Friday, May 23 2008 at 3:12 AM
ryan king said:
Friday, May 23 2008 at 4:18 AM
Rob Russell said:
Friday, May 23 2008 at 4:24 AM
ed said:
Friday, May 23 2008 at 6:29 AM
Thor Larholm said:
Friday, May 23 2008 at 6:38 AM
Andy Lester said:
Friday, May 23 2008 at 9:04 AM
Adam Wiggins said:
Friday, May 23 2008 at 11:00 AM
Daniel Yokomizo said:
Friday, May 23 2008 at 12:01 PM
asenchi said:
Friday, May 23 2008 at 12:22 PM
Neda said:
Saturday, May 24 2008 at 1:09 AM
Aristotle Pagaltzis said:
Sunday, May 25 2008 at 1:06 AM
Etan Wexler said:
Monday, May 26 2008 at 7:33 AM
Sylvain said:
Monday, May 26 2008 at 12:23 PM
damien wetzel said:
Tuesday, June 3 2008 at 7:44 AM
Jonas Galvez said:
Sunday, June 8 2008 at 9:18 AM
Fabrice Medio said:
Tuesday, June 10 2008 at 2:49 AM
Chaitanya Gupta said:
Tuesday, July 8 2008 at 5:42 AM
Levi "Karatorian" Aho said:
Tuesday, July 15 2008 at 8:54 AM
hassy said:
Friday, September 18 2009 at 10:45 AM