Do not check request response status code when the protocol isn't HTTP (fix #110)
This commit is contained in:
parent
dd6d8dba6e
commit
6aee6411f9
|
@ -115,7 +115,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
|
|||
|
||||
- (void)connection:(NSURLConnection *)aConnection didReceiveResponse:(NSURLResponse *)response
|
||||
{
|
||||
if ([((NSHTTPURLResponse *)response) statusCode] >= 400)
|
||||
if ([response respondsToSelector:@selector(statusCode)] && [((NSHTTPURLResponse *)response) statusCode] >= 400)
|
||||
{
|
||||
[aConnection cancel];
|
||||
|
||||
|
|
Loading…
Reference in New Issue