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

This commit is contained in:
Olivier Poitrey 2012-05-04 16:30:38 +02:00
parent dd6d8dba6e
commit 6aee6411f9
1 changed files with 1 additions and 1 deletions

View File

@ -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];