Forum Moderators: phranque

Message Too Old, No Replies

View http headers

Do I need a packet sniffer?

         

ga_ga

6:35 am on Mar 10, 2003 (gmt 0)

10+ Year Member



Trying to view what's actually getting sent from my server, i.e. http response headers, do I need a packet sniffer? If so what's a good simple one suitable for use on an XP machine running MSIE6 / Opera 7.01 / Lynx, looking at data from a linux / apache server? I'm trying to get to the bottom of why MSIE won't display a custom 404 page properly where Opera and Lynx will.

Key_Master

6:39 am on Mar 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How many bytes is your 404 page?

ga_ga

7:00 am on Mar 10, 2003 (gmt 0)

10+ Year Member



206 bytes, Key_Master. It contains only text, there are no images or other includes referenced. I'm just wondering if it's the case that if a true 404 gets sent to MSIE, it goes no further and displays it's own generic 404 page from within the browser.. reason I suspect this is that the last two lines on the MSIE 404 page are '404 page not found[newline]- and this is the suspicious bit - 'Microsoft Internet Explorer'.

Wondering if I might need to ask my host to not send an actual 404 code. I'd like to try and get to the bottom of what's happening before I contact them again, because I think they're as confused as I am as to what's going on. They maintain there's no problem and everything works fine. I've tried viewing incorrect filenames from several MSIE installs on several computers, always get the same MSIE 404 page. Try lynx, always get the custom 404 page. weirrrd!

[edited by: ga_ga at 7:09 am (utc) on Mar. 10, 2003]

Key_Master

7:09 am on Mar 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It needs to be at least 512 bytes to render in IE.

IE has a "feature" that is enabled by default. If the custom error page is less than 512 bytes, IE will deliver a "friendly" version. You can disable this by clicking on Tools> Internet Options> Advance. Then scroll down to 'Browsing' and uncheck 'Show friendly HTTP error pages'. Making your error page 512 bytes or greater is the better solution though.

[edited by: Key_Master at 7:10 am (utc) on Mar. 10, 2003]

ga_ga

7:10 am on Mar 10, 2003 (gmt 0)

10+ Year Member



Wow really? Hey let me just go try that..

ga_ga

7:15 am on Mar 10, 2003 (gmt 0)

10+ Year Member



Key_Master, you deserve a medal.

Added an angry rant against MSIE's tomfoolery in an HTML comment and hey presto :-)

[edited by: ga_ga at 7:17 am (utc) on Mar. 10, 2003]

Key_Master

7:17 am on Mar 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



:)

Brett_Tabke

8:15 am on Mar 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



run proxomitron [google.com] and turn on the live log display.

mapostel

8:26 am on Mar 10, 2003 (gmt 0)

10+ Year Member



You could also use a telnet client to send GET requests to port 80. You'd need to specify the host and the port (80) depending on the software or command line used. Then send this request:
GET / HTTP/1.1 <enter>
Host: example.com
<enter><enter>

You will then see the server reply. If you want to request a certain file use
GET /test.html HTTP/1.1

At least you have a manual alternative here...

seindal

1:05 pm on Mar 10, 2003 (gmt 0)

10+ Year Member



I usually use "wget -d URL" to trace what is going on.

Wget is a unix program, but there appears to be a windows version too, though I haven't tried it. Look at
[interlog.com...]

René.

ga_ga

1:26 pm on Mar 10, 2003 (gmt 0)

10+ Year Member



Windows binary of wget tried, and not found wanting.. useful! I'll keep that handy :)

Had to fire it up direct (call it from the command line in a command shell) on XP, you could possibly just double-click it into life in Win95/98?

seindal

2:11 pm on Mar 10, 2003 (gmt 0)

10+ Year Member



Wget is a command line tool.

René

ga_ga

5:26 pm on Mar 10, 2003 (gmt 0)

10+ Year Member



Strange thing I didn't understand (guess this ia a bit off the thread) is that if I entered www.domain.com as the command line argument, off it went, and fetched my main page into a local file. 'index.html'. Lovely, except.. I havent got an index.html!

Perfect copy of my main index file, except with a different file extension. It must be some kind of default setting? Still I guess it's hardly important. The display of the realtime server - client interaction was spot-on. And it's absolute simplicity to download & use.