Skip to content

Commit 6aee641

Browse files
author
Olivier Poitrey
committed
Do not check request response status code when the protocol isn't HTTP (fix SDWebImage#110)
1 parent dd6d8db commit 6aee641

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDWebImageDownloader.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ - (void)cancel
115115

116116
- (void)connection:(NSURLConnection *)aConnection didReceiveResponse:(NSURLResponse *)response
117117
{
118-
if ([((NSHTTPURLResponse *)response) statusCode] >= 400)
118+
if ([response respondsToSelector:@selector(statusCode)] && [((NSHTTPURLResponse *)response) statusCode] >= 400)
119119
{
120120
[aConnection cancel];
121121

0 commit comments

Comments
 (0)