Skip to content

Commit

Permalink
fix(ios): check cookie availabity before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ozonelmy authored and zoomchan-cxj committed Jun 21, 2022
1 parent 1f342b2 commit b902ad8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/sdk/module/network/HippyNetWork.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)data
for (NSString *allValues in keysvalues) {
@autoreleasepool {
NSArray<NSString *> *value = [allValues componentsSeparatedByString:@"="];
if ([value count] < 2) {
continue;
}
NSDictionary *dictionary = @{NSHTTPCookieName: value[0], NSHTTPCookieValue: value[1], NSHTTPCookieExpires: expireString, NSHTTPCookiePath: path, NSHTTPCookieDomain: domain};
NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:dictionary];
if (cookie) {
Expand Down

0 comments on commit b902ad8

Please sign in to comment.