• commit-queue@webkit.org's avatar
    2011-04-07 Julien Chaffraix <jchaffraix@codeaurora.org> · 18f892cf
    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: svn://svn.chromium.org/blink/trunk@83260 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    18f892cf
ChangeLog-2011-02-16 1.67 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.