WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
180950
We should use "error" redirect mode for fetching service worker scripts
https://bugs.webkit.org/show_bug.cgi?id=180950
Summary
We should use "error" redirect mode for fetching service worker scripts
Chris Dumez
Reported
2017-12-18 15:05:09 PST
We should use "error" redirect mode for fetching service worker scripts, as per: -
https://w3c.github.io/ServiceWorker/#update
(Step 7.5)
Attachments
Patch
(10.08 KB, patch)
2017-12-18 15:08 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(12.07 KB, patch)
2017-12-18 15:42 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(13.16 KB, patch)
2017-12-18 16:08 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2017-12-18 15:08:44 PST
Created
attachment 329689
[details]
Patch
Chris Dumez
Comment 2
2017-12-18 15:42:42 PST
Created
attachment 329694
[details]
Patch
youenn fablet
Comment 3
2017-12-18 15:51:41 PST
Comment on
attachment 329694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329694&action=review
> LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt:6 > +FAIL Registering redirected script assert_throws: Registration of redirected script should fail. function "function () { throw e }" threw object "TypeError: Script URL
https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fresources%2Fregistration-worker.js
fetch resulted in error: Redirections are not allowed" that is not a DOMException SecurityError: property "code" is equal to undefined, expected 18
It does not seem there is any change of behavior, except for the message to be more precise. Maybe this test was throwing for a different reason?
Chris Dumez
Comment 4
2017-12-18 16:03:17 PST
Comment on
attachment 329694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=329694&action=review
>> LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt:6 >> +FAIL Registering redirected script assert_throws: Registration of redirected script should fail. function "function () { throw e }" threw object "TypeError: Script URL
https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fresources%2Fregistration-worker.js
fetch resulted in error: Redirections are not allowed" that is not a DOMException SecurityError: property "code" is equal to undefined, expected 18 > > It does not seem there is any change of behavior, except for the message to be more precise. > Maybe this test was throwing for a different reason?
Yep, the test is bad and attempt to redirect to an invalid URL. I am about to submit a PR upstream.
Chris Dumez
Comment 5
2017-12-18 16:07:18 PST
(In reply to Chris Dumez from
comment #4
)
> Comment on
attachment 329694
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=329694&action=review
> > >> LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/registration-security-error.https-expected.txt:6 > >> +FAIL Registering redirected script assert_throws: Registration of redirected script should fail. function "function () { throw e }" threw object "TypeError: Script URL
https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fresources%2Fregistration-worker.js
fetch resulted in error: Redirections are not allowed" that is not a DOMException SecurityError: property "code" is equal to undefined, expected 18 > > > > It does not seem there is any change of behavior, except for the message to be more precise. > > Maybe this test was throwing for a different reason? > > Yep, the test is bad and attempt to redirect to an invalid URL. I am about > to submit a PR upstream.
->
https://github.com/w3c/web-platform-tests/pull/8733
Chris Dumez
Comment 6
2017-12-18 16:08:49 PST
Created
attachment 329700
[details]
Patch
WebKit Commit Bot
Comment 7
2017-12-18 16:48:10 PST
Comment on
attachment 329700
[details]
Patch Clearing flags on attachment: 329700 Committed
r226087
: <
https://trac.webkit.org/changeset/226087
>
WebKit Commit Bot
Comment 8
2017-12-18 16:48:12 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2017-12-18 16:50:52 PST
<
rdar://problem/36120116
>
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