File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,23 @@ - (void)stopLoading
299299 [_webView stopLoading ];
300300}
301301
302+ - (NSString *) cookieDescription : (NSHTTPCookie *)cookie {
303+
304+ NSMutableString *cDesc = [[NSMutableString alloc ] init ];
305+ [cDesc appendFormat: @" %@ =%@ ;" ,
306+ [[cookie name ] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
307+ [[cookie value ] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
308+ if ([cookie.domain length ] > 0 )
309+ [cDesc appendFormat: @" domain=%@ ;" , [cookie domain ]];
310+ if ([cookie.path length ] > 0 )
311+ [cDesc appendFormat: @" path=%@ ;" , [cookie path ]];
312+ if (cookie.expiresDate != nil )
313+ [cDesc appendFormat: @" expiresDate=%@ ;" , [cookie expiresDate ]];
314+
315+
316+ return cDesc;
317+ }
318+
302319- (void ) copyCookies {
303320
304321 NSHTTPCookieStorage * storage = [NSHTTPCookieStorage sharedHTTPCookieStorage ];
You can’t perform that action at this time.
0 commit comments