[Bug] [iOS] clearCookies does not work
See original GitHub issueDescribe the bug
When a request response has the header set-cookie
the cookie is correctly set and then retrieved with getCookieString()
. When clearCookies()
is called the cookie is no more available with getCookieString()
but persists in next http calls. Behavior is correct on Android.
System info
- affected HTTP plugin version: 2.1.1
- affected platform(s) and version(s): iOS 12.4
- affected device(s): Simulator and physical device
- cordova version: 5.2.5
- cordova platform version(s): ios 5.0.1, android 8.0.0
Are you using ionic-native-wrapper? Yes.
- ionic-native-wrapper version: 5.12.0
- did you check ionic-native issue tracker for your problem? Yes, no one reported the problem.
Minimum viable code to reproduce
I wrote a basic app with 4 buttons and a mini webserver which basically set a cookie (with a GET to /set-cookie
path) and print the request cookie headers (with a GET to /
).
- App: https://github.com/gabrielepmattia/ionic-cookie-test
- Server code: https://gist.github.com/gabrielepmattia/f9f6f4ce5e3312590e24e2631bc7a638
For reproducing, add the iOS platform then build and run on device. Press the buttons in sequence from top to bottom, the last result should be empty. (I also used this app for testing the browser behavior, and the cookie is not even set – maybe is convenient to open another issue for describing this inconsistent behavior between platforms)
Screenshots None
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:13 (2 by maintainers)
Just released now 🙂
Same here … @gabrielepmattia, @FredCote have you found a solution? plugin version: 2.0.9 OS version: iPadOS 13.1
I had to rollback to v1.9.0. Works fine.