-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=98137 Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-02 Reviewed by Kentaro Hara. Source/WebCore: According to the XMLHttpRequest specification, overrideMimeType(mime) sets the "Content-Type" header for the response to mime. However, with the current implementation, calling overrideMimeType(mime) does not affect the value returned by client.getResponseHeader("Content-Type"). This patch makes sure the response's "Content-Type" header is properly updated with the override MIME type. Test: http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveResponse): LayoutTests: Add layout test to check that calling overrideMimeType(mime) properly sets the response's "Content-Type" header to mime. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header-expected.txt: Added. * http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-content-type-header.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e83e2e1e