Explorar o código

http connection: add error code path if we can't return a thumbnail

Felix Paul Kühne %!s(int64=9) %!d(string=hai) anos
pai
achega
604d39c66b
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Sources/VLCHTTPConnection.m

+ 2 - 1
Sources/VLCHTTPConnection.m

@@ -128,7 +128,7 @@
             @try {
                 mo = [moc existingObjectWithID:[psc managedObjectIDForURIRepresentation:[NSURL URLWithString:filePath]] error:nil];
             }@catch (NSException *exeption) {
-                // somebody gave us a malformed or stale URIRepresentation
+                return [[HTTPErrorResponse alloc] initWithErrorCode:404];
             }
 
             NSData *theData;
@@ -151,6 +151,7 @@
             }
         }
     }
+    return [[HTTPErrorResponse alloc] initWithErrorCode:404];
 }
 
 - (NSObject<HTTPResponse> *)_httpGETLibraryForPath:(NSString *)path