Bug 655238 - add "application/xslt+xml" as media type for XSLT, affects stylesheet loading both from processing instruction and HTTP Link header field, also adding it to the Accept header sent when fetching XSLTs. r=sicking

This commit is contained in:
Julian Reschke 2011-05-28 14:34:36 +02:00
parent 5861162dc0
commit a599362539
3 changed files with 3 additions and 1 deletions

View File

@ -732,6 +732,7 @@ nsXMLContentSink::ProcessStyleLink(nsIContent* aElement,
NS_ConvertUTF16toUTF8 type(aType);
if (type.EqualsIgnoreCase(TEXT_XSL) ||
type.EqualsIgnoreCase(APPLICATION_XSLT_XML) ||
type.EqualsIgnoreCase(TEXT_XML) ||
type.EqualsIgnoreCase(APPLICATION_XML)) {
if (aAlternate) {

View File

@ -498,7 +498,7 @@ txCompileObserver::startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
if (httpChannel) {
httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
NS_LITERAL_CSTRING("text/xml,application/xml,application/xhtml+xml,*/*;q=0.1"),
NS_LITERAL_CSTRING("text/xml,application/xml,application/xhtml+xml,application/xslt+xml,*/*;q=0.1"),
PR_FALSE);
nsCOMPtr<nsIURI> referrerURI;

View File

@ -98,6 +98,7 @@
#define APPLICATION_XPINSTALL "application/x-xpinstall"
#define APPLICATION_XML "application/xml"
#define APPLICATION_XHTML_XML "application/xhtml+xml"
#define APPLICATION_XSLT_XML "application/xslt+xml"
#define APPLICATION_MATHML_XML "application/mathml+xml"
#define APPLICATION_RDF_XML "application/rdf+xml"