зеркало из https://github.com/mozilla/gecko-dev.git
Bug 286090 nsXMLHttpRequest.cpp should probably avoid text/xml
patch by bug@annevankesteren.nl r=doron sr=peterv
This commit is contained in:
Родитель
49732c5891
Коммит
6d22ad3517
|
@ -1477,13 +1477,13 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
|
|||
NS_ASSERTION(uploadChannel, "http must support nsIUploadChannel");
|
||||
|
||||
// If no content type header was set by the client, we set it to
|
||||
// text/xml.
|
||||
// application/xml.
|
||||
nsCAutoString contentType;
|
||||
if (NS_FAILED(httpChannel->
|
||||
GetRequestHeader(NS_LITERAL_CSTRING("Content-Type"),
|
||||
contentType)) ||
|
||||
contentType.IsEmpty()) {
|
||||
contentType = NS_LITERAL_CSTRING("text/xml");
|
||||
contentType = NS_LITERAL_CSTRING("application/xml");
|
||||
}
|
||||
|
||||
rv = uploadChannel->SetUploadStream(postDataStream, contentType, -1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче