• commit-queue@webkit.org's avatar
    Discard event data not followed by an empty line before eof when parsing an event-stream · 7877ad0b
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=68833
    
    Patch by Per-Erik Brodin <per-erik.brodin@ericsson.com> on 2011-12-21
    Reviewed by Alexey Proskuryakov.
    
    Source/WebCore:
    
    Test: http/tests/eventsource/eventsource-eof.html
    
    * page/EventSource.cpp:
    (WebCore::EventSource::didFinishLoading):
    (WebCore::EventSource::parseEventStreamLine):
    * page/EventSource.h:
    
    LayoutTests:
    
    * http/tests/eventsource/eventsource-eof-expected.txt: Added.
    * http/tests/eventsource/eventsource-eof.html: Added.
    * http/tests/eventsource/eventsource-reconnect-expected.txt: Updated.
    * http/tests/eventsource/eventsource-reconnect.html: Added lastEventId check.
    * http/tests/eventsource/resources/es-eof.php: Added.
    * http/tests/eventsource/resources/reconnect.php: Added data to be discarded.
    * http/tests/eventsource/resources/response-content-type-charset.php: Added empty line before eof.
    * http/tests/eventsource/resources/simple-event-stream.asis: Added empty line before eof.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7877ad0b
EventSource.h 4.35 KB