IE bug with HTTP_ACCEPT HTTP header, and workaround

Internet Explorer only sends an "HTTP_ACCEPT" header once per HTTP session.

To see the bug, load this page once in IE and below you'll see the HTTP_ACCEPT header which your browser sent to the server.  Reload and it becomes just "*/*".  Fortunately, you can work around this by capturing that info elsewhere the first time it's sent.

Bug Demo:

Request.ServerVariables("HTTP_ACCEPT") ?
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Workaround Demo:

Request.Cookies.Item("HTTP_ACCEPT") ?
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

My Workaround Code (ASP):

Run this where needed and then you can then use Request.Cookies.Item("HTTP_ACCEPT") in place of Request.ServerVariables("HTTP_ACCEPT").
'IE HTTP_Accept workaround: Cookie should last the duration of the browser's HTTP session.
IF Request.Cookies.Item("HTTP_ACCEPT") = ""  THEN
	Response.Cookies.Item("HTTP_ACCEPT") = Request.ServerVariables("HTTP_ACCEPT")
END IF

Notes:

Credits:

-Rob Eberhardt (@throbs.net)