Skip to content

EventSource: ignore IDs with U+0000 - #2849

Merged
domenic merged 1 commit into
masterfrom
annevk/eventsource
Aug 3, 2017
Merged

domenic merged 1 commit into
masterfrom
annevk/eventsource

Conversation

@annevk

@annevk annevk commented Jul 19, 2017

Copy link
Copy Markdown
Member

@annevk

annevk commented Jul 19, 2017

Copy link
Copy Markdown
Member Author

Note that implementations don't match this yet, but my rationale is as follows:

  • It doesn't seem right that you can set header values with a U+0000 when neither XMLHttpRequest nor Headers allow for that.
  • If you cannot create such header values, you shouldn't be able to set the event field either. Otherwise you might not notice where things go wrong.

@annevk annevk added topic: eventsource Server-sent events and EventSource and removed topic: eventsource Server-sent events and EventSource labels Jul 19, 2017
@domenic

domenic commented Jul 29, 2017

Copy link
Copy Markdown
Member

@yutakahirano can you review? Maybe @mcmanus too?

@yutakahirano

Copy link
Copy Markdown
Member

lgtm

@domenic
domenic merged commit e0d4e9e into master Aug 3, 2017
@domenic
domenic deleted the annevk/eventsource branch August 3, 2017 19:26
@annevk

annevk commented Aug 4, 2017

Copy link
Copy Markdown
Member Author

@domenic I would have preferred for the tests to be reviewed first. We could file browser bugs I suppose, but it seems somewhat wrong if the tests haven't been vetted yet.

hubot pushed a commit to WebKit/WebKit-http that referenced this pull request Aug 16, 2017
https://bugs.webkit.org/show_bug.cgi?id=175178

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT test coverage from:
- web-platform-tests/wpt#6584

* web-platform-tests/eventsource/format-field-id-null-expected.txt: Added.
* web-platform-tests/eventsource/format-field-id-null.htm: Added.
* web-platform-tests/eventsource/resources/last-event-id.py:
(main):
* web-platform-tests/eventsource/w3c-import.log:

Source/WebCore:

EventSource: ignore IDs with U+0000 as per:
whatwg/html#2849

Test: imported/w3c/web-platform-tests/eventsource/format-field-id-null.htm

* page/EventSource.cpp:
(WebCore::EventSource::parseEventStreamLine):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: eventsource Server-sent events and EventSource

Development

Successfully merging this pull request may close these issues.

3 participants