Bug 577130 xmlparser should tell channels that it expects the content to be xml

r=peterv
This commit is contained in:
timeless@mozdev.org 2010-07-07 10:38:56 +03:00
parent ec3adfa1f0
commit 9cda45b61f

View File

@ -799,14 +799,17 @@ nsExpatDriver::OpenInputStreamFromExternalDTD(const PRUnichar* aFPIStr,
return NS_ERROR_CONTENT_BLOCKED;
}
rv = NS_OpenURI(aStream, uri);
nsCAutoString absURL;
uri->GetSpec(absURL);
CopyUTF8toUTF16(absURL, aAbsURL);
return rv;
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannel(getter_AddRefs(channel), uri);
NS_ENSURE_SUCCESS(rv, rv);
channel->SetContentType(NS_LITERAL_CSTRING("application/xml"));
return channel->Open(aStream);
}
static nsresult