-
commit-queue@webkit.org authored
Reviewed by Alexey Proskuryakov. EventSource should only accept UTF-8 charset https://bugs.webkit.org/show_bug.cgi?id=56942 * ChangeLog-2011-02-16: Corrected previous commit message. Pointed out by Alexey. * http/tests/eventsource/eventsource-bad-mime-type-expected.txt: Updated with the new console message. * http/tests/eventsource/eventsource-content-type-charset-expected.txt: * http/tests/eventsource/eventsource-content-type-charset.html: Beefed up this test and merged the following test into it. The new tests check that we dispatch a console error if the charset is wrong. * http/tests/eventsource/eventsource-content-type-text-event-stream-foobar-expected.txt: Removed. * http/tests/eventsource/eventsource-content-type-text-event-stream-foobar.html: Removed. * http/tests/eventsource/resources/response-content-type-charset.php: Return the charset passed in the URL. Also added PHP's magic quotes handling as this would make the test fail on Mac. * http/tests/eventsource/resources/response-content-type-event-stream-foobar.php: Removed. 2011-04-07 Julien Chaffraix <jchaffraix@codeaurora.org> Reviewed by Alexey Proskuryakov. EventSource should only accept UTF-8 charset https://bugs.webkit.org/show_bug.cgi?id=56942 Following the discussion on bug 45372, this change implements the recommended way of handling "charset". We only accept UTF-8 but no other encoding. This matches the encoding of the EventSource and also may fix TomCat that automatically send this charset. * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type is wrong to the console to help debugging (only in the case of an HTTP 200 response though). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
commit-queue@webkit.org authoredReviewed by Alexey Proskuryakov. EventSource should only accept UTF-8 charset https://bugs.webkit.org/show_bug.cgi?id=56942 * ChangeLog-2011-02-16: Corrected previous commit message. Pointed out by Alexey. * http/tests/eventsource/eventsource-bad-mime-type-expected.txt: Updated with the new console message. * http/tests/eventsource/eventsource-content-type-charset-expected.txt: * http/tests/eventsource/eventsource-content-type-charset.html: Beefed up this test and merged the following test into it. The new tests check that we dispatch a console error if the charset is wrong. * http/tests/eventsource/eventsource-content-type-text-event-stream-foobar-expected.txt: Removed. * http/tests/eventsource/eventsource-content-type-text-event-stream-foobar.html: Removed. * http/tests/eventsource/resources/response-content-type-charset.php: Return the charset passed in the URL. Also added PHP's magic quotes handling as this would make the test fail on Mac. * http/tests/eventsource/resources/response-content-type-event-stream-foobar.php: Removed. 2011-04-07 Julien Chaffraix <jchaffraix@codeaurora.org> Reviewed by Alexey Proskuryakov. EventSource should only accept UTF-8 charset https://bugs.webkit.org/show_bug.cgi?id=56942 Following the discussion on bug 45372, this change implements the recommended way of handling "charset". We only accept UTF-8 but no other encoding. This matches the encoding of the EventSource and also may fix TomCat that automatically send this charset. * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type is wrong to the console to help debugging (only in the case of an HTTP 200 response though). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading