Bug 225290

Summary: Safari will use older UA while receiving 301 redirect
Product: WebKit Reporter: Wen Huang <jokeygeek>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, ap, koivisto, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   
Attachments:
Description Flags
Request-UA-changed none

Description Wen Huang 2021-05-02 21:58:06 PDT
Created attachment 427538 [details]
Request-UA-changed

Hi,

We found that Safari will cache the request header and use it next time but the UA might be the older version.
e.g. 14.0.3 Safari is correct UA but somehow will use 14.0.1

Seems if we visited the website before and received the 301 redirect with Safari 14.0.1, the request header will be cached and be used in next time even already upgraded to Safari 14.0.3.
Comment 1 Alexey Proskuryakov 2021-05-06 18:13:24 PDT
Did you confirm if the old UA is actually sent over HTTP? This seems like maybe it's just reused from the cache, which is not necessarily wrong.
Comment 2 Wen Huang 2021-05-06 19:40:52 PDT
Hi Alex,

Yes, We saw the older UA was sent to the server while redirecting http->https.

I agree that reusing from cache is not wrong.

The problem is Safari version in cache of the actual Safari version that iOS is using of doesn't match.

If Safari has already upgraded to the newer version, the cache should clear the older one.
Comment 3 Radar WebKit Bug Importer 2021-05-09 21:59:12 PDT
<rdar://problem/77727807>