Bug 966385. Stop using the deprecated GetInputEncoding in XHR code. r=peterv

This commit is contained in:
Boris Zbarsky 2014-12-01 15:17:49 -05:00
parent cb114f6309
commit d7cbbd0050

View File

@ -2401,14 +2401,7 @@ GetRequestBody(nsIDOMDocument* aDoc, nsIInputStream** aResult,
nsACString& aCharset)
{
aContentType.AssignLiteral("application/xml");
nsAutoString inputEncoding;
aDoc->GetInputEncoding(inputEncoding);
if (!DOMStringIsNull(inputEncoding)) {
CopyUTF16toUTF8(inputEncoding, aCharset);
}
else {
aCharset.AssignLiteral("UTF-8");
}
aCharset = aDoc->GetDocumentCharacterSet();
// Serialize to a stream so that the encoding used will
// match the document's.