19
19
} // namespace
20
20
21
21
@interface BenoniHTTPTaskContextWrap : NSObject
22
- @property HTTPTaskContext *context;
22
+ @property ( nonatomic ) HTTPTaskContext *context;
23
23
- (BenoniHTTPTaskContextWrap *)initWithContext : (HTTPTaskContext *)context ;
24
24
- (void )dealloc ;
25
25
@end
@@ -44,7 +44,7 @@ - (void)dealloc {
44
44
45
45
@interface BenoniHTTPSessionDelegate
46
46
: NSObject <NSURLSessionDelegate , NSURLSessionTaskDelegate >
47
- @property (readonly )
47
+ @property (nonatomic , readonly )
48
48
NSMutableDictionary <NSNumber *, BenoniHTTPTaskContextWrap *> *contextMap;
49
49
- (BenoniHTTPSessionDelegate *)init ;
50
50
@@ -91,13 +91,13 @@ - (void)URLSession:(NSURLSession *)session
91
91
if ([httpResponse respondsToSelector: @selector (allHeaderFields )]) {
92
92
auto &headers = context->headers ;
93
93
NSDictionary *allHeaderFields = [httpResponse allHeaderFields ];
94
- for (NSString *key in allHeaderFields) {
95
- headers[[key UTF8String ]] =
96
- [[allHeaderFields objectForKey: key ] UTF8String ];
94
+ for (NSString *headerField in allHeaderFields) {
95
+ headers[[headerField UTF8String ]] =
96
+ [[allHeaderFields objectForKey: headerField ] UTF8String ];
97
97
}
98
98
}
99
99
100
- context->status = [httpResponse statusCode ];
100
+ context->status = static_cast < uint16_t >( [httpResponse statusCode ]) ;
101
101
102
102
context->encoding = NSUTF8StringEncoding;
103
103
NSString *encodingName = [httpResponse textEncodingName ];
0 commit comments