mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-06-13 09:25:06 +08:00
Fix for local image URLs
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PINRemoteImage"
|
||||
s.version = "1.2.2"
|
||||
s.version = "1.2.3"
|
||||
s.summary = "A thread safe, performant, feature rich image fetcher"
|
||||
s.homepage = "https://github.com/pinterest/PINRemoteImage"
|
||||
s.license = 'Apache 2.0'
|
||||
|
||||
@@ -102,7 +102,8 @@
|
||||
[self lock];
|
||||
dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)];
|
||||
[self unlock];
|
||||
if ([(NSHTTPURLResponse *)task.response statusCode] == 404 && !error) {
|
||||
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
|
||||
if ([response respondsToSelector:@selector(statusCode)] && [response statusCode] == 404 && !error) {
|
||||
error = [NSError errorWithDomain:NSURLErrorDomain
|
||||
code:NSURLErrorRedirectToNonExistentLocation
|
||||
userInfo:@{NSLocalizedDescriptionKey : @"The requested URL was not found on this server."}];
|
||||
|
||||
Reference in New Issue
Block a user