[Webkit-unassigned] [Bug 282427] New: Service Worker can't correctly redirect relative URLs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 1 02:05:47 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=282427

            Bug ID: 282427
           Summary: Service Worker can't correctly redirect relative URLs
           Product: WebKit
           Version: Safari 18
          Hardware: Mac (Apple Silicon)
                OS: macOS 15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Service Workers
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: berislav.grgicak at gmail.com
                CC: youennf at gmail.com

Created attachment 473100

  --> https://bugs.webkit.org/attachment.cgi?id=473100&action=review

Error in the network request

When I use a Service Worker for 300 redirects it works well when the Location header is set to an absolute URL like http://localhost/redirect.html, but the request returns an error when I set the location header to a relative URL like /redirect.html.

Relative URL redirects work in both Firefox and Chrome, just not in Safari.

If a relative URL location header is returned by a server like Apache the redirect will work. This is why I assume the issue is specifically related to Service Workers. 

Here is a repository with a minimal example of the issue https://github.com/bgrgicak/service-worker-redirect-test and testing instruction.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241101/ab85c990/attachment.htm>


More information about the webkit-unassigned mailing list