Bug 465455. Use the charset we'll send in the header to encode with. r+sr=sicking, a=beltzner

This commit is contained in:
Boris Zbarsky 2008-11-26 23:10:28 -05:00
parent f8a74d33fa
commit c07a04cc4f

View File

@ -2494,9 +2494,8 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
rv = storStream->GetOutputStream(0, getter_AddRefs(output));
NS_ENSURE_SUCCESS(rv, rv);
// Empty string for encoding means to use document's current
// encoding.
rv = serializer->SerializeToStream(doc, output, EmptyCString());
// Make sure to use the encoding we'll send
rv = serializer->SerializeToStream(doc, output, charset);
NS_ENSURE_SUCCESS(rv, rv);
output->Close();