[Webkit-unassigned] [Bug 11049] XMLHttpRequest always defaults Content-Type to application/xml, while it should depend on data type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 5 07:40:08 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=11049





--- Comment #6 from Carol Szabo <carol.szabo at nokia.com>  2009-11-05 07:40:08 PDT ---
I acknowledged that IE is not correct but it is a violation of RFC2616 to put a
content type that defines a media type and then provide a body of different
media type. text/plain for a string is a safe choice in my opinion and I think
that this is why Anne chose that for the spec.
The spec can be changed, though, to specify application/xml and to require the
user to set the content type if the string contains something else then xml, as
I said, the name of the object is XMLHttpRequest, not GenericHttpRequest.

(In reply to comment #5)
> > Mozilla uses (like the current version of WebKit): application/xml
> > IE8: does not set the header at all.
> > 
> > To me neither is quite correct, but I'd pick IE over Mozilla since the content
> > of the string may not necessarily be XML.
> 
> That's actually a violation of RFC2616: "Any HTTP/1.1 message containing an
> entity-body SHOULD include a Content-Type header field defining the media type
> of that body."
> 
> Based on the above data, I'd say that we should probably preserve our behavior
> for now, and consult with Mozilla on when/if they are going to change Gecko
> behavior.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list