Wednesday, January 23, 2002
Is this a case of a server working around a browser bug that is working around a server bug?
Mark is writing an embedable webserver and asked me to look into a rather odd problem he's having. I looked into it, and yes, it's an odd problem.
He's testing the redirection code, so if you give a URL like:
and news is a directory, then it will redirect you to:
So far so good. Only to ease testing, he's running the server on non-reserved TCP port, so the URL:
is then redirected to
And therein lies the odd problem.
Netscape 4.07 and Lynx 2.8.1pre.9 under Linux (okay, RedHat 5.2, my current home platform), when given the new location, goes to
Which seems to be okay when you connect directly to the webserver, but gives a web proxy (like squid) fits. IE 5.0.whatever fails entirely. Mozilla 0.9.2.1 under Linux works fine and seems to get the URL processing correct, but Mozilla 0.9.5 under the Macintosh fails much like IE does.
But here's the real kicker: They all work fine when Apache sends the redirect with a port number.
We can't figure it out. As far as we can tell, the server response is the same between Apache and Mark's server, only the server name is different (okay, the HTML page sent with the 30x response is a bit different too, but not my much).