Add defaultSessionConfiguration to URLSessionConfiguration and fix URLSession

This commit is contained in:
Duncan Cunningham 2024-02-18 16:40:32 +01:00
parent f19baa2f16
commit 29b41cc5b0
2 changed files with 15 additions and 0 deletions

View File

@ -99,6 +99,7 @@ set(cfnetwork_sources
URL/NSURLRequest.m
URL/NSURLResponse.m
URL/NSURLSession.m
URL/NSCFURLSession.m
HTTP/NSHTTPCookie.m
HTTP/NSHTTPCookieStorage.m

View File

@ -31,8 +31,22 @@ NSString* const NSURLSessionDownloadTaskResumeData = @"NSURLSessionDownloadTaskR
@implementation NSURLSessionDataTask
@end
@implementation NSURLSessionDownloadTask
@end
@implementation NSURLSessionUploadTask
@end
@implementation NSURLSessionConfiguration
static NSURLSessionConfiguration *_defaultSessionConfiguration = nil;
+ (NSURLSessionConfiguration *)defaultSessionConfiguration {
if (_defaultSessionConfiguration == nil) {
_defaultSessionConfiguration = [[NSURLSessionConfiguration alloc] init];
}
return _defaultSessionConfiguration;
}
@end