Revert "NSURLSession Reimplementation (#411)"

This reverts commit 07233534e6.
This commit is contained in:
rfm 2024-07-02 19:19:14 +01:00 committed by GitHub
parent 07233534e6
commit 3fedf31c2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 7197 additions and 5391 deletions

View file

@ -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];