WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226635
EventSource.constructor throws an exception when the url param is an empty string
https://bugs.webkit.org/show_bug.cgi?id=226635
Summary
EventSource.constructor throws an exception when the url param is an empty st...
zyscoder@gmail.com
Reported
2021-06-04 02:46:36 PDT
Steps to reproduce: (1) Open a tab and navigate to any URL; (2) Run the following code in the Console of Devtools: ``` new EventSource("") ``` (3) Then this code would throw a SyntaxError exception. Actual results: This code would throw a SyntaxError exception: `SyntaxError: The string did not match the expected pattern.` Expected results: As
https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource
says, when the URL param is an empty string, it should be parsed as a relative URL to the API's URL. In fact, Firefox works as the spec says, and Chrome has fixed this problem following the spec nowadays too.
Attachments
Patch
(1.25 KB, patch)
2021-06-04 12:08 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(3.67 KB, patch)
2021-06-04 15:56 PDT
,
Alex Christensen
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-06-04 12:08:52 PDT
Created
attachment 430597
[details]
Patch
Alex Christensen
Comment 2
2021-06-04 12:09:11 PDT
Seems like an easy enough fix. Let's see if we already have tests that cover this.
Yusuke Suzuki
Comment 3
2021-06-04 12:16:11 PDT
Comment on
attachment 430597
[details]
Patch r=me
Alex Christensen
Comment 4
2021-06-04 15:56:50 PDT
Created
attachment 430626
[details]
Patch
Darin Adler
Comment 5
2021-06-06 23:55:47 PDT
Looks like Yusuke already reviews, so don’t really need my review too, but I saw a review?
Radar WebKit Bug Importer
Comment 6
2021-06-11 02:47:16 PDT
<
rdar://problem/79189234
>
Alex Christensen
Comment 7
2021-06-11 09:15:24 PDT
r278763
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug