Redirection 302 for IE versus Firefox

IE is quite happy to process a LOCATION: url within the http prologue regardless of the presence/absence of Content-Type and Content-Length, but Firefox requires Content-Type and Content-Length.

HTTP/1.1 302 Found
Connection: close
Date: Fri, 06 Mar 2009 02:47:24 GMT
Server: Microsoft-IIS/6.0
Content-Type: text/html
LOCATION: http://demos.href.com/htsc:PgLogin

When writing an ISAPI extension for IIS6, using HSE_REQ_SEND_URL_REDIRECT_RESP avoids the problem because IIS decides on the headers for you.

However if you use the more generic HSE_REQ_SEND_RESPONSE_HEADER, then you absolutely positively must get the headers exactly right in order to have happiness in both IE and Firefox.

See also: Redirect in response to POST transaction

Comments

Popular Posts