349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
if ([newURLScheme caseInsensitiveCompare: @"http"] !=
OF_ORDERED_SAME &&
[newURLScheme caseInsensitiveCompare: @"https"] !=
OF_ORDERED_SAME)
follow = false;
if (!_client->_insecureRedirectsAllowed &&
[URL.scheme caseInsensitiveCompare: @"https"] ==
OF_ORDERED_SAME &&
[newURLScheme caseInsensitiveCompare: @"http"] ==
OF_ORDERED_SAME)
follow = false;
if (follow && [_client->_delegate respondsToSelector: @selector(
|
|
|
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
if ([newURLScheme caseInsensitiveCompare: @"http"] !=
OF_ORDERED_SAME &&
[newURLScheme caseInsensitiveCompare: @"https"] !=
OF_ORDERED_SAME)
follow = false;
if (!_client->_allowsInsecureRedirects &&
[URL.scheme caseInsensitiveCompare: @"https"] ==
OF_ORDERED_SAME &&
[newURLScheme caseInsensitiveCompare: @"http"] ==
OF_ORDERED_SAME)
follow = false;
if (follow && [_client->_delegate respondsToSelector: @selector(
|
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
|
else
return defaultShouldFollow(request.method, statusCode);
}
@end
@implementation OFHTTPClient
@synthesize delegate = _delegate;
@synthesize insecureRedirectsAllowed = _insecureRedirectsAllowed;
+ (instancetype)client
{
return [[[self alloc] init] autorelease];
}
- (void)dealloc
|
|
|
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
|
else
return defaultShouldFollow(request.method, statusCode);
}
@end
@implementation OFHTTPClient
@synthesize delegate = _delegate;
@synthesize allowsInsecureRedirects = _allowsInsecureRedirects;
+ (instancetype)client
{
return [[[self alloc] init] autorelease];
}
- (void)dealloc
|