mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 01:01:03 +00:00
Revert "NSURLSession Reimplementation (#411)"
This reverts commit 07233534e6
.
This commit is contained in:
parent
07233534e6
commit
3fedf31c2d
50 changed files with 7197 additions and 5391 deletions
|
@ -43,8 +43,7 @@
|
|||
#import "Foundation/NSSet.h"
|
||||
#import "Foundation/NSValue.h"
|
||||
#import "Foundation/NSString.h"
|
||||
#import "Foundation/NSDateFormatter.h"
|
||||
#import "Foundation/NSLocale.h"
|
||||
#import "Foundation/NSCalendarDate.h"
|
||||
#import "GNUstepBase/Unicode.h"
|
||||
|
||||
static NSString * const HTTPCookieHTTPOnly = @"HTTPOnly";
|
||||
|
@ -682,22 +681,10 @@ _setCookieKey(NSMutableDictionary *dict, NSString *key, NSString *value)
|
|||
else if ([[key lowercaseString] isEqual: @"expires"])
|
||||
{
|
||||
NSDate *expireDate;
|
||||
NSDateFormatter *formatter;
|
||||
NSLocale *locale;
|
||||
NSTimeZone *gmtTimeZone;
|
||||
|
||||
locale = [NSLocale localeWithLocaleIdentifier:@"en_US"];
|
||||
gmtTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
|
||||
|
||||
formatter = [[NSDateFormatter alloc] init];
|
||||
[formatter setDateFormat: @"EEE, dd-MMM-yyyy HH:mm:ss zzz"];
|
||||
[formatter setLocale: locale];
|
||||
[formatter setTimeZone: gmtTimeZone];
|
||||
|
||||
expireDate = [formatter dateFromString:value];
|
||||
expireDate = [NSCalendarDate dateWithString: value
|
||||
calendarFormat: @"%a, %d-%b-%Y %I:%M:%S %Z"];
|
||||
if (expireDate)
|
||||
[dict setObject: expireDate forKey: NSHTTPCookieExpires];
|
||||
RELEASE(formatter);
|
||||
}
|
||||
else if ([[key lowercaseString] isEqual: @"max-age"])
|
||||
[dict setObject: value forKey: NSHTTPCookieMaximumAge];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue