You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cookies not being sent after a redirected response (#22178)
Summary:
Fixes#19376
On iOS, the `HTTPShouldHandleCookies` boolean has no effect when custom cookies are set (see https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1415485-httpshouldhandlecookies?preferredLanguage=occ). Setting custom cookies prevents the cookies of a redirect response from being re-used in the subsequent request.
This is why issue #19376 is opened.
The fix is to intercept the redirect request, and to manually set the cookies. This effectively makes the Android and iOS behaviours converge.
Changelog:
----------
[iOS] [Fixed] - Fix cookies not being sent on iOS after redirect
Pull Request resolved: #22178
Differential Revision: D13191961
Pulled By: shergin
fbshipit-source-id: 4445a2499034a9846c6d7c37c1f1b72c9fd30129
0 commit comments