Bug 1207233 - Don't provide a default content-type header if user calls XHR.setRequestHeader('Content-Type', ''), r=jduell

This commit is contained in:
Michael Layzell
2015-09-23 12:09:14 -04:00
parent 0bd994a5f7
commit f93a8e2029
3 changed files with 8 additions and 9 deletions

View File

@@ -2700,8 +2700,7 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable<RequestBody>& aBody)
nsAutoCString contentType;
if (NS_FAILED(httpChannel->
GetRequestHeader(NS_LITERAL_CSTRING("Content-Type"),
contentType)) ||
contentType.IsEmpty()) {
contentType))) {
contentType = defaultContentType;
if (!charset.IsEmpty()) {