Diff
Modified: branches/safari-605-branch/LayoutTests/ChangeLog (227888 => 227889)
--- branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-31 09:09:42 UTC (rev 227889)
@@ -1,5 +1,18 @@
2018-01-31 Jason Marcell <[email protected]>
+ Cherry-pick r227770. rdar://problem/37019490
+
+ 2018-01-29 Youenn Fablet <[email protected]>
+
+ ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
+ https://bugs.webkit.org/show_bug.cgi?id=182134
+
+ Reviewed by Chris Dumez.
+
+ * TestExpectations:
+
+2018-01-31 Jason Marcell <[email protected]>
+
Cherry-pick r227858. rdar://problem/37049295
2018-01-30 Ryosuke Niwa <[email protected]>
Modified: branches/safari-605-branch/LayoutTests/TestExpectations (227888 => 227889)
--- branches/safari-605-branch/LayoutTests/TestExpectations 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/LayoutTests/TestExpectations 2018-01-31 09:09:42 UTC (rev 227889)
@@ -154,7 +154,6 @@
imported/w3c/web-platform-tests/service-workers/service-worker/extendable-event-waituntil.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-partial-stream.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html [ Skip ]
-imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/postmessage.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/postmessage-msgport-to-client.https.html [ Skip ]
imported/w3c/web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https.html [ Skip ]
Modified: branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog (227888 => 227889)
--- branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog 2018-01-31 09:09:42 UTC (rev 227889)
@@ -1,5 +1,18 @@
2018-01-31 Jason Marcell <[email protected]>
+ Cherry-pick r227770. rdar://problem/37019490
+
+ 2018-01-29 Youenn Fablet <[email protected]>
+
+ ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
+ https://bugs.webkit.org/show_bug.cgi?id=182134
+
+ Reviewed by Chris Dumez.
+
+ * web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
+
+2018-01-31 Jason Marcell <[email protected]>
+
Cherry-pick r227760. rdar://problem/37019484
2018-01-29 Oleksandr Skachkov <[email protected]>
Modified: branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt (227888 => 227889)
--- branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt 2018-01-31 09:09:42 UTC (rev 227889)
@@ -1,6 +1,4 @@
-
-Harness Error (TIMEOUT), message = null
FAIL Normal redirect to same-origin scope. promise_test: Unhandled rejection with value: object "NotSupportedError: Passing MessagePort objects to postMessage is not yet supported"
FAIL Normal redirect to other-origin scope. promise_test: Unhandled rejection with value: object "NotSupportedError: Passing MessagePort objects to postMessage is not yet supported"
@@ -24,11 +22,10 @@
NOTRUN Redirect to same-origin other-scope with opaque redirect response.
NOTRUN Redirect to other-origin out-scope with opaque redirect response.
NOTRUN Redirect to other-origin in-scope with opaque redirect response.
-NOTRUN No location redirect response.
-NOTRUN Redirect to same-origin out-scope with opaque redirect response which is passed through Cache.
-NOTRUN Redirect to same-origin same-scope with opaque redirect response which is passed through Cache.
-NOTRUN Redirect to same-origin other-scope with opaque redirect response which is passed through Cache.
-NOTRUN Redirect to other-origin out-scope with opaque redirect response which is passed through Cache.
-NOTRUN Redirect to other-origin in-scope with opaque redirect response which is passed through Cache.
-NOTRUN No location redirect response via Cache.
+PASS No location redirect response.
+PASS Redirect to same-origin out-scope with opaque redirect response which is passed through Cache.
+PASS Redirect to same-origin same-scope with opaque redirect response which is passed through Cache.
+PASS Redirect to same-origin other-scope with opaque redirect response which is passed through Cache.
+PASS Redirect to other-origin out-scope with opaque redirect response which is passed through Cache.
+PASS Redirect to other-origin in-scope with opaque redirect response which is passed through Cache.
Modified: branches/safari-605-branch/Source/WebCore/platform/network/HTTPHeaderMap.h (227888 => 227889)
--- branches/safari-605-branch/Source/WebCore/platform/network/HTTPHeaderMap.h 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/Source/WebCore/platform/network/HTTPHeaderMap.h 2018-01-31 09:09:42 UTC (rev 227889)
@@ -142,7 +142,7 @@
void set(HTTPHeaderName, const String& value);
void add(HTTPHeaderName, const String& value);
bool addIfNotPresent(HTTPHeaderName, const String&);
- bool contains(HTTPHeaderName) const;
+ WEBCORE_EXPORT bool contains(HTTPHeaderName) const;
WEBCORE_EXPORT bool remove(HTTPHeaderName);
// Instead of passing a string literal to any of these functions, just use a HTTPHeaderName instead.
Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (227888 => 227889)
--- branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog 2018-01-31 09:09:42 UTC (rev 227889)
@@ -1,5 +1,22 @@
2018-01-31 Jason Marcell <[email protected]>
+ Cherry-pick r227770. rdar://problem/37019490
+
+ 2018-01-29 Youenn Fablet <[email protected]>
+
+ ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
+ https://bugs.webkit.org/show_bug.cgi?id=182134
+
+ Reviewed by Chris Dumez.
+
+ As per fetch spec, a response with a redirection status code but no Location header should not be considered as a redirection.
+ This is also consistent with SubresourceLoader::didReceiveResponse.
+
+ * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
+ (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
+
+2018-01-31 Jason Marcell <[email protected]>
+
Cherry-pick r227755. rdar://problem/37050332
2018-01-29 Brent Fulgham <[email protected]>
Modified: branches/safari-605-branch/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp (227888 => 227889)
--- branches/safari-605-branch/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp 2018-01-31 09:09:39 UTC (rev 227888)
+++ branches/safari-605-branch/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp 2018-01-31 09:09:42 UTC (rev 227889)
@@ -110,9 +110,8 @@
}
response.setSource(ResourceResponse::Source::ServiceWorker);
- if (response.isRedirection()) {
+ if (response.isRedirection() && response.httpHeaderFields().contains(HTTPHeaderName::Location)) {
m_redirectionStatus = RedirectionStatus::Receiving;
- // FIXME: Get shouldClearReferrerOnHTTPSToHTTPRedirect value from
m_loader->willSendRequest(m_loader->request().redirectedRequest(response, m_shouldClearReferrerOnHTTPSToHTTPRedirect), response, [protectedThis = makeRef(*this), this](ResourceRequest&& request) {
if (request.isNull() || !m_callback)
return;