[webkit-changes] [WebKit/WebKit] e4b308: Service Worker: Redirect loses hash fragment

youennf noreply at github.com
Fri Jul 7 08:33:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e4b3080bb04a0f54d1c3d9cd707d92d37d5feb54
      https://github.com/WebKit/WebKit/commit/e4b3080bb04a0f54d1c3d9cd707d92d37d5feb54
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    A LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash-worker.js
    A LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash.https-expected.txt
    A LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash.https.html
    A LayoutTests/http/wpt/service-workers/resources/redirect-with-hash.py
    M Source/WebCore/platform/network/ResourceRequestBase.cpp
    M Source/WebCore/platform/network/ResourceRequestBase.h
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp

  Log Message:
  -----------
  Service Worker: Redirect loses hash fragment
https://bugs.webkit.org/show_bug.cgi?id=258195
rdar://111208014

Reviewed by Chris Dumez.

Make sure to implement the fragment identifier handling defined in https://fetch.spec.whatwg.org/#concept-response-location-url:
- If the response has a fragment identifier and the URL computed from the location header does not, add the fragment identifier back.

* LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash-worker.js: Added.
* LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash.https-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/navigation-redirect-with-hash.https.html: Added.
* LayoutTests/http/wpt/service-workers/resources/redirect-with-hash.py: Added.
(main):
* Source/WebCore/platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::redirectedRequest const):
* Source/WebCore/platform/network/ResourceRequestBase.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::processRedirectResponse):

Canonical link: https://commits.webkit.org/265845@main




More information about the webkit-changes mailing list