Closed Bug 527123 Opened 16 years ago Closed 9 years ago

XMLHttpRequest: set correct Content-Type header for send(DOMString)

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: annevk, Unassigned)

Details

(Keywords: student-project)

Specification: http://dev.w3.org/2006/webapi/XMLHttpRequest/ WebKit: https://bugs.webkit.org/show_bug.cgi?id=11049 Currently Mozilla always defaults to application/xml. That's just wrong.
Component: DOM → DOM: Mozilla Extensions
Keywords: student-project
So, I see http://hg.mozilla.org/mozilla-central/file/a3e1c960433b/content/base/src/nsXMLHttpRequest.cpp#l3100 which unconditionally sets the content type of mChannel to application/xml. However, we correctly pass text/plain to ExplicitSetUploadChannel earlier (since the GetResponseBody code for the string path sets that up); what's the interaction between the two here? Is this still valid?
Component: DOM: Mozilla Extensions → DOM
This was fixed in bug 1207233, which changed the default Content-Types sent for uploads to match the spec. DOMStrings are now sent with "text/plain;charset=UTF-8".
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.