Log Message
Redirected iframe loading with Request.redirect=follow should fail https://bugs.webkit.org/show_bug.cgi?id=181491
Patch by Youenn Fablet <[email protected]> on 2018-01-11 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Updated tests to output a more deterministic output, more debuggable. Made use of media.js to allow loading either oga or mp3 when oga is not supported. * web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt: * web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html: Source/WebKit: * WebProcess/Storage/ServiceWorkerClientFetch.cpp: (WebKit::ServiceWorkerClientFetch::validateResponse): LayoutTests: * TestExpectations:
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/TestExpectations
- trunk/LayoutTests/imported/w3c/ChangeLog
- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt
- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html
- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-redirect-iframe.html
- trunk/Source/WebKit/ChangeLog
- trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp
Diff
Modified: trunk/LayoutTests/ChangeLog (226791 => 226792)
--- trunk/LayoutTests/ChangeLog 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/ChangeLog 2018-01-11 19:54:59 UTC (rev 226792)
@@ -1,3 +1,12 @@
+2018-01-11 Youenn Fablet <[email protected]>
+
+ Redirected iframe loading with Request.redirect=follow should fail
+ https://bugs.webkit.org/show_bug.cgi?id=181491
+
+ Reviewed by Alex Christensen.
+
+ * TestExpectations:
+
2018-01-10 Simon Fraser <[email protected]>
On macOS, getBoundingClientRect gives incorrect values when pinch-zoomed
Modified: trunk/LayoutTests/TestExpectations (226791 => 226792)
--- trunk/LayoutTests/TestExpectations 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/TestExpectations 2018-01-11 19:54:59 UTC (rev 226792)
@@ -167,7 +167,6 @@
imported/w3c/web-platform-tests/service-workers/service-worker/about-blank-replacement.https.html [ Pass Failure ]
webkit.org/b/179248 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html [ Pass Failure ]
-imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/multiple-update.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/performance-timeline.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/service-workers/service-worker/registration-service-worker-attributes.https.html [ Pass Failure ]
@@ -182,6 +181,7 @@
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https.html [ DumpJSConsoleLogInStdErr ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-response-taint.https.html [ DumpJSConsoleLogInStdErr ]
+imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html [ Slow ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html [ Slow ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https.html [ Slow ]
[ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html [ Slow ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (226791 => 226792)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-01-11 19:54:59 UTC (rev 226792)
@@ -1,3 +1,16 @@
+2018-01-11 Youenn Fablet <[email protected]>
+
+ Redirected iframe loading with Request.redirect=follow should fail
+ https://bugs.webkit.org/show_bug.cgi?id=181491
+
+ Reviewed by Alex Christensen.
+
+ Updated tests to output a more deterministic output, more debuggable.
+ Made use of media.js to allow loading either oga or mp3 when oga is not supported.
+
+ * web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
+ * web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html:
+
2018-01-10 Youenn Fablet <[email protected]>
Use no-cache fetch mode when loading main documents with location.reload()
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt (226791 => 226792)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt 2018-01-11 19:54:59 UTC (rev 226792)
@@ -1,8 +1,41 @@
+CONSOLE MESSAGE: XMLHttpRequest cannot load https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fservice-workers%2Fservice-worker%2Fresources%2Fsimple.txt. Response served by service worker is opaque redirect
CONSOLE MESSAGE: Cross-origin image load denied by Cross-Origin Resource Sharing policy.
CONSOLE MESSAGE: XMLHttpRequest cannot load https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fservice-workers%2Fservice-worker%2Fresources%2Fsimple.txt. Response served by service worker is opaque redirect
+CONSOLE MESSAGE: XMLHttpRequest cannot load https://localhost:9443/service-workers/service-worker/resources/redirect.py?Redirect=%2Fservice-workers%2Fservice-worker%2Fresources%2Fsimple.txt. Response served by service worker is opaque redirect
+PASS Verify redirect mode of Fetch API and ServiceWorker FetchEvent.
+PASS Verify redirected of Response(Fetch API) and ServiceWorker FetchEvent.
+PASS Verify redirected of Response(Fetch API), Cache API and ServiceWorker FetchEvent.
+PASS Normal XHR should succeed. - default
+PASS Redirected XHR should succeed. - default
+PASS Redirected XHR with Request.redirect=follow should succeed. - default
+PASS Redirected XHR with Request.redirect=error should fail. - default
+PASS Redirected XHR with Request.redirect=manual should fail. - default
+PASS Normal image resource should be loaded. - default
+PASS Redirected image resource should be loaded. - default
+PASS Loading redirected image with Request.redirect=follow should succeed. - default
+PASS Loading redirected image with Request.redirect=error should fail. - default
+PASS Loading redirected image with Request.redirect=manual should fail. - default
+PASS Normal audio resource should be loaded. - default
+PASS Redirected audio resource should be loaded. - default
+PASS Loading redirected audio with Request.redirect=follow should succeed. - default
+PASS Loading redirected audio with Request.redirect=error should fail. - default
+PASS Loading redirected audio with Request.redirect=manual should fail. - default
+PASS Normal iframe loading should succeed. - default
+PASS Normal redirected iframe loading should succeed. - default
+PASS Redirected iframe loading with Request.redirect=follow should fail. - default
+PASS Redirected iframe loading with Request.redirect=error should fail. - default
+PASS Redirected iframe loading with Request.redirect=manual should succeed. - default
+PASS Normal XHR should be resolved and response should not be redirected. - redirected
+PASS Redirected XHR should be resolved and response should be redirected. - redirected
+PASS Normal XHR should be resolved and response should not be redirected even with CORS mode. - redirected
+PASS Redirected XHR should be resolved and response.redirected should be redirected with CORS mode. - redirected
+PASS Redirected XHR should be reject and response should be redirected with NO-CORS mode and redirect-mode=manual. - redirected
+PASS Redirected CORS image should be reject and response should not be redirected with NO-CORS mode. - redirected
+PASS Normal XHR should be resolved and response should not be redirected. - cache
+PASS Redirected XHR should be resolved and response should be redirected. - cache
+PASS Normal XHR should be resolved and response should not be redirected even with CORS mode. - cache
+PASS Redirected XHR should be resolved and response.redirected should be redirected with CORS mode. - cache
+PASS Redirected XHR should be reject and response should be redirected with NO-CORS mode and redirect-mode=manual. - cache
+PASS Redirected CORS image should be reject and response should not be redirected with NO-CORS mode. - cache
-FAIL Verify redirect mode of Fetch API and ServiceWorker FetchEvent. promise_test: Unhandled rejection with value: object "Error: Redirected iframe loading with Request.redirect=follow should fail."
-FAIL Verify redirected of Response(Fetch API) and ServiceWorker FetchEvent. promise_test: Unhandled rejection with value: object "Error: wait_for_state must be passed a ServiceWorker"
-FAIL Verify redirected of Response(Fetch API), Cache API and ServiceWorker FetchEvent. promise_test: Unhandled rejection with value: object "Error: wait_for_state must be passed a ServiceWorker"
-
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html (226791 => 226792)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html 2018-01-11 19:54:59 UTC (rev 226792)
@@ -4,19 +4,22 @@
<script src=""
<script src=""
<script src=""
+<script src=""
<script src=""
<script>
-
+var test_scope = ""
function assert_resolves(promise, description) {
- return promise.catch(function(reason) {
- throw new Error(description + ' - ' + reason.message);
- });
+ return promise.then(
+ () => test(() => {}, description + " - " + test_scope),
+ (e) => test(() => { throw e; }, description + " - " + test_scope)
+ );
}
function assert_rejects(promise, description) {
- return promise.then(
- function() { throw new Error(description); },
- function() {});
+ return promise.then(
+ () => test(() => { assert_unreached(); }, description + " - " + test_scope),
+ () => test(() => {}, description + " - " + test_scope)
+ );
}
function iframe_test(url, timeout_enabled) {
@@ -52,11 +55,13 @@
}
promise_test(function(t) {
+ test_scope = "default";
+
var SCOPE = 'resources/fetch-request-redirect-iframe.html';
var SCRIPT = 'resources/fetch-rewrite-worker.js';
var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
var IMAGE_URL = base_path() + 'resources/square.png';
- var AUDIO_URL = base_path() + 'resources/silence.oga';
+ var AUDIO_URL = getAudioURI("/media/sound_5");
var XHR_URL = base_path() + 'resources/simple.txt';
var HTML_URL = base_path() + 'resources/dummy.html';
@@ -73,108 +78,106 @@
return wait_for_state(t, worker, 'activated');
})
.then(function() { return with_iframe(SCOPE); })
- .then(function(f) {
- frame = f;
- return Promise.all([
+ .then(async function(f) {
+ frame = f;
// XMLHttpRequest tests.
- assert_resolves(frame.contentWindow.xhr(XHR_URL),
- 'Normal XHR should succeed.'),
- assert_resolves(frame.contentWindow.xhr(REDIRECT_TO_XHR_URL),
- 'Redirected XHR should succeed.'),
- assert_resolves(
+ await assert_resolves(frame.contentWindow.xhr(XHR_URL),
+ 'Normal XHR should succeed.');
+ await assert_resolves(frame.contentWindow.xhr(REDIRECT_TO_XHR_URL),
+ 'Redirected XHR should succeed.');
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&redirect-mode=follow'),
- 'Redirected XHR with Request.redirect=follow should succeed.'),
- assert_rejects(
+ 'Redirected XHR with Request.redirect=follow should succeed.');
+ await assert_rejects(
frame.contentWindow.xhr(
'./?url=''&redirect-mode=error'),
- 'Redirected XHR with Request.redirect=error should fail.'),
- assert_rejects(
+ 'Redirected XHR with Request.redirect=error should fail.');
+ await assert_rejects(
frame.contentWindow.xhr(
'./?url=''&redirect-mode=manual'),
- 'Redirected XHR with Request.redirect=manual should fail.'),
+ 'Redirected XHR with Request.redirect=manual should fail.');
// Image loading tests.
- assert_resolves(frame.contentWindow.load_image(IMAGE_URL),
- 'Normal image resource should be loaded.'),
- assert_resolves(
+ await assert_resolves(frame.contentWindow.load_image(IMAGE_URL),
+ 'Normal image resource should be loaded.');
+ await assert_resolves(
frame.contentWindow.load_image(REDIRECT_TO_IMAGE_URL),
- 'Redirected image resource should be loaded.'),
- assert_resolves(
+ 'Redirected image resource should be loaded.');
+ await assert_resolves(
frame.contentWindow.load_image(
'./?url=''&redirect-mode=follow'),
'Loading redirected image with Request.redirect=follow should' +
- ' succeed.'),
- assert_rejects(
+ ' succeed.');
+ await assert_rejects(
frame.contentWindow.load_image(
'./?url=''&redirect-mode=error'),
'Loading redirected image with Request.redirect=error should ' +
- 'fail.'),
- assert_rejects(
+ 'fail.');
+ await assert_rejects(
frame.contentWindow.load_image(
'./?url=''&redirect-mode=manual'),
'Loading redirected image with Request.redirect=manual should' +
- ' fail.'),
+ ' fail.');
// Audio loading tests.
- assert_resolves(frame.contentWindow.load_audio(AUDIO_URL),
- 'Normal audio resource should be loaded.'),
- assert_resolves(
+ await assert_resolves(frame.contentWindow.load_audio(AUDIO_URL),
+ 'Normal audio resource should be loaded.');
+ await assert_resolves(
frame.contentWindow.load_audio(REDIRECT_TO_AUDIO_URL),
- 'Redirected audio resource should be loaded.'),
- assert_resolves(
+ 'Redirected audio resource should be loaded.');
+ await assert_resolves(
frame.contentWindow.load_audio(
'./?url=''&redirect-mode=follow'),
'Loading redirected audio with Request.redirect=follow should' +
- ' succeed.'),
- assert_rejects(
+ ' succeed.');
+ await assert_rejects(
frame.contentWindow.load_audio(
'./?url=''&redirect-mode=error'),
'Loading redirected audio with Request.redirect=error should ' +
- 'fail.'),
- assert_rejects(
+ 'fail.');
+ await assert_rejects(
frame.contentWindow.load_audio(
'./?url=''&redirect-mode=manual'),
'Loading redirected audio with Request.redirect=manual should' +
- ' fail.'),
+ ' fail.');
// Iframe tests.
- assert_resolves(iframe_test(HTML_URL),
- 'Normal iframe loading should succeed.'),
- assert_resolves(
+ await assert_resolves(iframe_test(HTML_URL),
+ 'Normal iframe loading should succeed.');
+ await assert_resolves(
iframe_test(REDIRECT_TO_HTML_URL),
- 'Normal redirected iframe loading should succeed.'),
- assert_rejects(
+ 'Normal redirected iframe loading should succeed.');
+ await assert_rejects(
iframe_test(SCOPE + '?url=''&redirect-mode=follow',
true /* timeout_enabled */),
'Redirected iframe loading with Request.redirect=follow should'+
- ' fail.'),
- assert_rejects(
+ ' fail.');
+ await assert_rejects(
iframe_test(SCOPE + '?url=''&redirect-mode=error',
true /* timeout_enabled */),
'Redirected iframe loading with Request.redirect=error should '+
- 'fail.'),
- assert_resolves(
+ 'fail.');
+ await assert_resolves(
iframe_test(SCOPE + '?url=''&redirect-mode=manual',
true /* timeout_enabled */),
'Redirected iframe loading with Request.redirect=manual should'+
- ' succeed.'),
- ]);
+ ' succeed.');
})
.then(function() {
frame.remove();
@@ -184,6 +187,8 @@
// test for reponse.redirected
promise_test(function(t) {
+ test_scope = "redirected";
+
var SCOPE = 'resources/fetch-request-redirect-iframe.html';
var SCRIPT = 'resources/fetch-rewrite-worker.js';
var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
@@ -207,27 +212,26 @@
return wait_for_state(t, worker, 'activated');
})
.then(function() { return with_iframe(SCOPE); })
- .then(function(f) {
+ .then(async function(f) {
frame = f;
- return Promise.all([
// XMLHttpRequest tests.
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&expected_redirected=false' +
'&expected_resolves=true'),
'Normal XHR should be resolved and response should not be ' +
- 'redirected.'),
- assert_resolves(
+ 'redirected.');
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&expected_redirected=true' +
'&expected_resolves=true'),
'Redirected XHR should be resolved and response should be ' +
- 'redirected.'),
+ 'redirected.');
// tests for request's mode = cors
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&mode=cors' +
@@ -234,8 +238,8 @@
'&expected_redirected=false' +
'&expected_resolves=true'),
'Normal XHR should be resolved and response should not be ' +
- 'redirected even with CORS mode.'),
- assert_resolves(
+ 'redirected even with CORS mode.');
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&mode=cors' +
@@ -243,12 +247,12 @@
'&expected_redirected=true' +
'&expected_resolves=true'),
'Redirected XHR should be resolved and response.redirected ' +
- 'should be redirected with CORS mode.'),
+ 'should be redirected with CORS mode.');
// tests for request's mode = no-cors
// The response.redirect should be false since we will not add
// redirected url list when redirect-mode is not follow.
- assert_rejects(
+ await assert_rejects(
frame.contentWindow.xhr(
'./?url=''&mode=no-cors' +
@@ -256,10 +260,10 @@
'&expected_redirected=false' +
'&expected_resolves=false'),
'Redirected XHR should be reject and response should be ' +
- 'redirected with NO-CORS mode and redirect-mode=manual.'),
+ 'redirected with NO-CORS mode and redirect-mode=manual.');
// tests for redirecting to a cors
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.load_image(
'./?url=''&mode=no-cors' +
@@ -266,9 +270,8 @@
'&redirect-mode=follow' +
'&expected_redirected=false' +
'&expected_resolves=true'),
- 'Redirected COS image should be reject and response should ' +
- 'not be redirected with NO-CORS mode.'),
- ]);
+ 'Redirected CORS image should be reject and response should ' +
+ 'not be redirected with NO-CORS mode.');
})
.then(function() {
frame.remove();
@@ -278,6 +281,8 @@
// test for reponse.redirected after cached
promise_test(function(t) {
+ test_scope = "cache";
+
var SCOPE = 'resources/fetch-request-redirect-iframe.html';
var SCRIPT = 'resources/fetch-rewrite-worker.js';
var REDIRECT_URL = base_path() + 'resources/redirect.py?Redirect=';
@@ -301,11 +306,10 @@
return wait_for_state(t, worker, 'activated');
})
.then(function() { return with_iframe(SCOPE); })
- .then(function(f) {
+ .then(async function(f) {
frame = f;
- return Promise.all([
// XMLHttpRequest tests.
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&expected_redirected=false' +
@@ -312,8 +316,8 @@
'&expected_resolves=true' +
'&cache'),
'Normal XHR should be resolved and response should not be ' +
- 'redirected.'),
- assert_resolves(
+ 'redirected.');
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&expected_redirected=true' +
@@ -320,10 +324,10 @@
'&expected_resolves=true' +
'&cache'),
'Redirected XHR should be resolved and response should be ' +
- 'redirected.'),
+ 'redirected.');
// tests for request's mode = cors
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&mode=cors' +
@@ -331,8 +335,8 @@
'&expected_resolves=true' +
'&cache'),
'Normal XHR should be resolved and response should not be ' +
- 'redirected even with CORS mode.'),
- assert_resolves(
+ 'redirected even with CORS mode.');
+ await assert_resolves(
frame.contentWindow.xhr(
'./?url=''&mode=cors' +
@@ -341,12 +345,12 @@
'&expected_resolves=true' +
'&cache'),
'Redirected XHR should be resolved and response.redirected ' +
- 'should be redirected with CORS mode.'),
+ 'should be redirected with CORS mode.');
// tests for request's mode = no-cors
// The response.redirect should be false since we will not add
// redirected url list when redirect-mode is not follow.
- assert_rejects(
+ await assert_rejects(
frame.contentWindow.xhr(
'./?url=''&mode=no-cors' +
@@ -355,10 +359,10 @@
'&expected_resolves=false' +
'&cache'),
'Redirected XHR should be reject and response should be ' +
- 'redirected with NO-CORS mode and redirect-mode=manual.'),
+ 'redirected with NO-CORS mode and redirect-mode=manual.');
// tests for redirecting to a cors
- assert_resolves(
+ await assert_resolves(
frame.contentWindow.load_image(
'./?url=''&mode=no-cors' +
@@ -366,9 +370,8 @@
'&expected_redirected=false' +
'&expected_resolves=true' +
'&cache'),
- 'Redirected COS image should be reject and response should ' +
- 'not be redirected with NO-CORS mode.'),
- ]);
+ 'Redirected CORS image should be reject and response should ' +
+ 'not be redirected with NO-CORS mode.');
})
.then(function() {
frame.remove();
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-redirect-iframe.html (226791 => 226792)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-redirect-iframe.html 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-redirect-iframe.html 2018-01-11 19:54:59 UTC (rev 226792)
@@ -20,6 +20,7 @@
img._onload_ = resolve;
img._onerror_ = reject;
img.src = ""
+ setTimeout(() => { reject("image load timed out") }, 5000);
});
}
@@ -30,6 +31,7 @@
audio._oncanplay_ = resolve;
audio._onerror_ = reject;
audio.src = ""
+ setTimeout(() => { reject("audio load timed out") }, 5000);
});
}
</script>
Modified: trunk/Source/WebKit/ChangeLog (226791 => 226792)
--- trunk/Source/WebKit/ChangeLog 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/Source/WebKit/ChangeLog 2018-01-11 19:54:59 UTC (rev 226792)
@@ -1,5 +1,15 @@
2018-01-11 Youenn Fablet <[email protected]>
+ Redirected iframe loading with Request.redirect=follow should fail
+ https://bugs.webkit.org/show_bug.cgi?id=181491
+
+ Reviewed by Alex Christensen.
+
+ * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
+ (WebKit::ServiceWorkerClientFetch::validateResponse):
+
+2018-01-11 Youenn Fablet <[email protected]>
+
Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
https://bugs.webkit.org/show_bug.cgi?id=181480
Modified: trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp (226791 => 226792)
--- trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp 2018-01-11 19:53:08 UTC (rev 226791)
+++ trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp 2018-01-11 19:54:59 UTC (rev 226792)
@@ -90,7 +90,7 @@
if (options.redirect != FetchOptions::Redirect::Manual && options.mode != FetchOptions::Mode::Navigate && response.tainting() == ResourceResponse::Tainting::Opaqueredirect)
return ResourceError { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Response served by service worker is opaque redirect"), ResourceError::Type::AccessControl };
- if (options.redirect != FetchOptions::Redirect::Follow && response.isRedirected())
+ if ((options.redirect != FetchOptions::Redirect::Follow || options.mode == FetchOptions::Mode::Navigate) && response.isRedirected())
return ResourceError { errorDomainWebKitInternal, 0, response.url(), ASCIILiteral("Response served by service worker has redirections"), ResourceError::Type::AccessControl };
return std::nullopt;
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
