Bug 261332

Summary: Statuscodes 305,306,309, ... redirect even though they should not
Product: WebKit Reporter: jannis.rautenstrauch
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: achristensen, ahmad.saleem792, annevk, beidson, karlcow, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description jannis.rautenstrauch 2023-09-08 07:31:31 PDT
According to the fetch specification: "A redirect status is a status that is 301, 302, 303, 307, or 308.", i.e., all other status codes should not redirect. (https://fetch.spec.whatwg.org/#statuses)

WebKit redirect for many other status codes such as 305, 306, 309.
Test: https://echo.sectec.rocks/echo/?location=https://example.org&ecohd_status=305
Comment 1 Ahmad Saleem 2023-09-09 04:28:36 PDT
I am able to reproduce this in Safari / WebKit ToT, where the URL redirects to example.com while Chrome Canary 118 and Firefox Nightly 118 does not redirect.

Adding 'BrowserCompat' because both other browsers are matching each other and WebKit is behaving different.
Comment 2 Radar WebKit Bug Importer 2023-09-10 18:26:34 PDT
<rdar://problem/115264053>
Comment 3 Karl Dubost 2023-09-10 19:42:25 PDT
Confirmed.
Comment 4 Karl Dubost 2023-09-10 21:18:49 PDT
This can't be solved on the WebKit Project but this will be taken care of in the Radar.
Comment 5 Karl Dubost 2023-09-10 22:17:27 PDT
Jannis,
Thanks a lot if you have more like these, do not hesitate to report them. Super appreciated.