⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 227889 in webkit


Ignore:
Timestamp:
Jan 31, 2018, 1:09:42 AM (9 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r227770. rdar://problem/37019490

Location:
branches/safari-605-branch
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-605-branch/LayoutTests/ChangeLog

    r227884 r227889  
     12018-01-31  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227770. rdar://problem/37019490
     4
     5    2018-01-29  Youenn Fablet  <youenn@apple.com>
     6
     7            ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
     8            https://bugs.webkit.org/show_bug.cgi?id=182134
     9
     10            Reviewed by Chris Dumez.
     11
     12            * TestExpectations:
     13
    1142018-01-31  Jason Marcell  <jmarcell@apple.com>
    215
  • branches/safari-605-branch/LayoutTests/TestExpectations

    r227833 r227889  
    155155imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-partial-stream.https.html [ Skip ]
    156156imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html [ Skip ]
    157 imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https.html [ Skip ]
    158157imported/w3c/web-platform-tests/service-workers/service-worker/postmessage.https.html [ Skip ]
    159158imported/w3c/web-platform-tests/service-workers/service-worker/postmessage-msgport-to-client.https.html [ Skip ]
  • branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog

    r227888 r227889  
     12018-01-31  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227770. rdar://problem/37019490
     4
     5    2018-01-29  Youenn Fablet  <youenn@apple.com>
     6
     7            ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
     8            https://bugs.webkit.org/show_bug.cgi?id=182134
     9
     10            Reviewed by Chris Dumez.
     11
     12            * web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt:
     13
    1142018-01-31  Jason Marcell  <jmarcell@apple.com>
    215
  • branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect.https-expected.txt

    r227877 r227889  
    1  
    21
    3 Harness Error (TIMEOUT), message = null
    42
    53FAIL Normal redirect to same-origin scope. promise_test: Unhandled rejection with value: object "NotSupportedError: Passing MessagePort objects to postMessage is not yet supported"
    … …  
    2523NOTRUN Redirect to other-origin out-scope with opaque redirect response.
    2624NOTRUN Redirect to other-origin in-scope with opaque redirect response.
    27 NOTRUN No location redirect response.
    28 NOTRUN Redirect to same-origin out-scope with opaque redirect response which is passed through Cache.
    29 NOTRUN Redirect to same-origin same-scope with opaque redirect response which is passed through Cache.
    30 NOTRUN Redirect to same-origin other-scope with opaque redirect response which is passed through Cache.
    31 NOTRUN Redirect to other-origin out-scope with opaque redirect response which is passed through Cache.
    32 NOTRUN Redirect to other-origin in-scope with opaque redirect response which is passed through Cache.
    33 NOTRUN No location redirect response via Cache.
     25PASS No location redirect response.
     26PASS Redirect to same-origin out-scope with opaque redirect response which is passed through Cache.
     27PASS Redirect to same-origin same-scope with opaque redirect response which is passed through Cache.
     28PASS Redirect to same-origin other-scope with opaque redirect response which is passed through Cache.
     29PASS Redirect to other-origin out-scope with opaque redirect response which is passed through Cache.
     30PASS Redirect to other-origin in-scope with opaque redirect response which is passed through Cache.
    3431
  • branches/safari-605-branch/Source/WebCore/platform/network/HTTPHeaderMap.h

    r208985 r227889  
    143143    void add(HTTPHeaderName, const String& value);
    144144    bool addIfNotPresent(HTTPHeaderName, const String&);
    145     bool contains(HTTPHeaderName) const;
     145    WEBCORE_EXPORT bool contains(HTTPHeaderName) const;
    146146    WEBCORE_EXPORT bool remove(HTTPHeaderName);
    147147
  • branches/safari-605-branch/Source/WebKit/ChangeLog

    r227887 r227889  
     12018-01-31  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227770. rdar://problem/37019490
     4
     5    2018-01-29  Youenn Fablet  <youenn@apple.com>
     6
     7            ServiceWorkerClientFetch should not consider responses without Location headers as redirection responses
     8            https://bugs.webkit.org/show_bug.cgi?id=182134
     9
     10            Reviewed by Chris Dumez.
     11
     12            As per fetch spec, a response with a redirection status code but no Location header should not be considered as a redirection.
     13            This is also consistent with SubresourceLoader::didReceiveResponse.
     14
     15            * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
     16            (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
     17
    1182018-01-31  Jason Marcell  <jmarcell@apple.com>
    219
  • branches/safari-605-branch/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp

    r227877 r227889  
    111111    response.setSource(ResourceResponse::Source::ServiceWorker);
    112112
    113     if (response.isRedirection()) {
     113    if (response.isRedirection() && response.httpHeaderFields().contains(HTTPHeaderName::Location)) {
    114114        m_redirectionStatus = RedirectionStatus::Receiving;
    115         // FIXME: Get shouldClearReferrerOnHTTPSToHTTPRedirect value from
    116115        m_loader->willSendRequest(m_loader->request().redirectedRequest(response, m_shouldClearReferrerOnHTTPSToHTTPRedirect), response, [protectedThis = makeRef(*this), this](ResourceRequest&& request) {
    117116            if (request.isNull() || !m_callback)
Note: See TracChangeset for help on using the changeset viewer.