Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-9457] URLSession doesn't handle cookies as expected on Linux. #3575

Open
swift-ci opened this issue Dec 10, 2018 · 0 comments
Open

[SR-9457] URLSession doesn't handle cookies as expected on Linux. #3575

swift-ci opened this issue Dec 10, 2018 · 0 comments

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-9457
Radar None
Original Reporter aravikumar (JIRA User)
Type Bug
Environment

Swift Version 4.2

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 41a23e50bdc5f3e31783f819d9a30d9e

Issue Description:

Current Behavior:

When I make a network request using `URLSession` while running some code that is compiled and run through the XCode ecosystem, the cookies returned by the request are automatically stored and available. However, when I run the same Swift code on an Ubuntu docker image, the cookies returned by the response are not saved automatically. The cookies do come back from the server as I was able to print their values after the network response came back, but, they don't get stored. As a workaround, I explicitly tried to write to the local data store by calling `HTTPCookieStorage.sharedCookieStorage(forGroupContainerIdentifier: <name>).setCookie(thisCookie)`. However, even after I did this, the cookie value got cleaned while making the subsequent network request.

Expected Behavior:

URLSession's Cookie handling logic for Linux needs to be consistent with iOS and MacOS.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant