Authored by Olivier Poitrey

Do not check request response status code when the protocol isn't HTTP (fix #110)

@@ -115,7 +115,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot @@ -115,7 +115,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
115 115
116 - (void)connection:(NSURLConnection *)aConnection didReceiveResponse:(NSURLResponse *)response 116 - (void)connection:(NSURLConnection *)aConnection didReceiveResponse:(NSURLResponse *)response
117 { 117 {
118 - if ([((NSHTTPURLResponse *)response) statusCode] >= 400) 118 + if ([response respondsToSelector:@selector(statusCode)] && [((NSHTTPURLResponse *)response) statusCode] >= 400)
119 { 119 {
120 [aConnection cancel]; 120 [aConnection cancel];
121 121