Reuse of XMLHttpRequests causes character corruption in response text
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Aug 2013 00:51:39 +0000 (00:51 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Aug 2013 00:51:39 +0000 (00:51 +0000)
commit0f778eccca8cc6d1a2dc4dfb80bc39e06af1f5c0
tree0c1db8030be998b93ab69c281710a1b29c92704c
parente5fe8eaba577697dfb736e3b3e91dc36672a37a0
Reuse of XMLHttpRequests causes character corruption in response text
https://bugs.webkit.org/show_bug.cgi?id=119358

Reviewed by Anders Carlsson.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/6496e7bb9a0b46bc79032b86d5993b25f127a4cb

Test: http/tests/xmlhttprequest/reopen-encoding.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didFinishLoading):

LayoutTests:

* http/tests/xmlhttprequest/reopen-encoding-expected.txt: Added.
* http/tests/xmlhttprequest/reopen-encoding.html: Added.
* http/tests/xmlhttprequest/resources/get-utf-8.cgi: Added.
* http/tests/xmlhttprequest/resources/get-windows-1251.cgi: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/reopen-encoding-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/reopen-encoding.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/resources/get-utf-8.cgi [new file with mode: 0755]
LayoutTests/http/tests/xmlhttprequest/resources/get-windows-1251.cgi [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/xml/XMLHttpRequest.cpp