The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Saturday, August 24, 2002

Just gotta love MSIE …

I have a question about HTTP for you. Okay. If you compile Seminole 2.14 and go to a URL that is a directory with an index.html in it, you will find that (unlike Apache), I instead just send out a temporary redirect to the /index.html URL instead of serving up the index.html as the directory URL.

Now, it seems that this works fine with all browsers except one: Microsoft Internet Explorer. Apparently a 302 Redirect causes MSIE to just display the redirect page.

Question from Mark via email

The solution Mark found was to not send out the HTTP header Content-Type: and then MSIE would work properly. When I investigated though:

Very curious. Using MSIE 5.0 (original and SP2) if I went to:

I got redirected. But if I go to

I get the MSIE redirect page (and not the one from the web server!).

My reply to Mark's email

Mark then asked if it was a violation of RFC-2616 to not send out the Content-Type: header. Nope.

7.2.1 Type

   When an entity-body is included with a message, the data type of that
   body is determined via the header fields Content-Type and Content-
   Encoding. These define a two-layer, ordered encoding model:

       entity-body := Content-Encoding( Content-Type( data ) )

   Content-Type specifies the media type of the underlying data.
   Content-Encoding may be used to indicate any additional content
   codings applied to the data, usually for the purpose of data
   compression, that are a property of the requested resource. There is
   no default encoding.

   Any HTTP/1.1 message containing an entity-body SHOULD include a
   Content-Type header field defining the media type of that body. If
   and only if the media type is not given by a Content-Type field, the
   recipient MAY attempt to guess the media type via inspection of its
   content and/or the name extension(s) of the URI used to identify the
   resource. If the media type remains unknown, the recipient SHOULD
   treat it as type "application/octet-stream".

§ 7.2.1 of RFC-2616

The SHOULD gets Mark off the hook for not sending out the Content-Type: header.

But then Mark also found:

Internet Explorer does not properly handle an HTTP/1.1 302 redirect returned from a proxy server or Internet server when the HTTP/1.1 302 redirect is sent to Internet Explorer in two separate TCP frames (one with the HTTP/1.1 302 redirect, and the other with a HTML body containing a page for the new location).

Internet Explorer Returns Error Message When Being Redirected

Incredible. Not only is this for MSIE version FOUR but it still doesn't work properly for MSIE version FIVE.

Just gotta love MSIE …

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site:, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2021 by Sean Conner. All Rights Reserved.