Skip to content

Commit

Permalink
Do not check request response status code when the protocol isn't HTTP (
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Poitrey committed May 4, 2012
1 parent dd6d8db commit 6aee641
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SDWebImageDownloader.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ - (void)cancel

- (void)connection:(NSURLConnection *)aConnection didReceiveResponse:(NSURLResponse *)response
{
if ([((NSHTTPURLResponse *)response) statusCode] >= 400)
if ([response respondsToSelector:@selector(statusCode)] && [((NSHTTPURLResponse *)response) statusCode] >= 400)
{
[aConnection cancel];

Expand Down

0 comments on commit 6aee641

Please sign in to comment.