Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

MSXML client side XSLT does not send accept-language header

$
0
0

When using client side XSLT in IE9 I noticed that IE sends different headers for requests that fetch the XSL and subsequent requests triggered via thedocument() method, than for requesting the original XML file. In particular theaccept-language header is missing completely.

The bootstrap XML looks like this:

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="transform.xsl"?><root/>

and the XSLT like this

...<body><xsl:apply-templates select="document('section.xml')"/></body>
...

What I notice is that both the XSLT as well as the section.xml file are loaded with an HTTP request without an accept language header. The request headers to fetch the XML file look like this:

Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US,de-DE;q=0.5
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

whereas the other resources are loaded with

Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: Keep-Alive

Is this a feature or a bug? Other browsers such as FF or Chrome send identical headers.

A working example can be found on my test server

This effect causes problems in a real life project, because the XML files are generated dynamically and contain end-user facing content that is negotiated based on theaccept-language header. This fails because no header is sent by the transformer.

Any insight or suggestions for workarounds are welcome! Thanks! Carsten


Carsten

Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>