Bug 257298

Summary: Web Inspector: Network Preserve Log loses 302 redirect to same URL
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   
Attachments:
Description Flags
Twitter redirect
none
Non-Twitter redirect screenshot none

Description Jeff Johnson 2023-05-24 18:11:01 PDT
Created attachment 466489 [details]
Twitter redirect

Steps to reproduce:
1) Open a new Safari private window
2) Open the web inspector to the Network tab
3) Enable Preserve Log
4) Open https://twitter.com/webkit/status/1658940299950039047

Expected Results: The Network log shows the 302 redirect.

Actual Results: The Network log doesn't show the 302 redirect.

Notes: Twitter now requires cookies to be enabled in order to view a tweet. You can see this with curl:

% curl -i 'https://twitter.com/webkit/status/1658940299950039047'
HTTP/2 302 
date: Thu, 25 May 2023 00:59:34 GMT
perf: 7626143928
vary: Accept
server: tsa_b
location: /webkit/status/1658940299950039047
set-cookie: guest_id_marketing=

It tries to set cookies and redirects to the same URL. But the web inspector does not reflect this. It only shows the request with cookies, but doesn't show the initial request without cookies or the 302 redirect. See the attached screenshots, one with a same-URL redirect and one with a regular redirect.
Comment 1 Jeff Johnson 2023-05-24 18:11:33 PDT
Created attachment 466490 [details]
Non-Twitter redirect screenshot
Comment 2 Radar WebKit Bug Importer 2023-09-01 08:58:42 PDT
<rdar://problem/114823280>