-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Initial implementation of HTTPCookieStorage #672
Conversation
Foundation/NSHTTPCookieStorage.swift
Outdated
properties["Domain"] = _domain | ||
return properties | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is work in progress. Other properties need to be added.
0e7e566
to
e78f60e
Compare
added implementations to a few more methods, tests pending |
f187740
to
783820a
Compare
783820a
to
653e71c
Compare
I'm working on updating this one. And also waiting on: #889 |
3a7234b
to
8c9b7a7
Compare
Rebased and updated. This is dependent on the merger of #889 |
Foundation/NSHTTPCookieStorage.swift
Outdated
|
||
private func createCookie(_ properties: [String: Any]) -> HTTPCookie? { | ||
var cookieProperties: [HTTPCookiePropertyKey: Any] = [:] | ||
for key in properties.keys { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the use of for (key, value) in properties
be more appropriate here as dictionary value is used anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @naithar I've updated the patch.
c7c82cd
to
abce6a3
Compare
abce6a3
to
1e99d3f
Compare
The commit for this PR has now been picked up by #889. |
#889 is merged. I am closing this. |
I've created this pull request for review and comments. There are two important considerations here, around cookie persistence:
TODOs:
sharedCookieStorage(forGroupContainerIdentifier:)
ImplementingsortedCookies(using sortOrder: [NSSortDescriptor])
NSSortDescriptor is not implemented (is it supported on Linux?)