From fd75e1b260e2aa75be11c9fbc3d630ae0651d6be Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Wed, 22 Dec 2021 16:24:49 -0800 Subject: [PATCH] HTTP source: Fix API abuse by calling completion handler as requested --- Plugins/HTTPSource/HTTPSource.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/HTTPSource/HTTPSource.m b/Plugins/HTTPSource/HTTPSource.m index c9da7aac0..1cafd6cab 100644 --- a/Plugins/HTTPSource/HTTPSource.m +++ b/Plugins/HTTPSource/HTTPSource.m @@ -139,7 +139,7 @@ willPerformHTTPRedirection:(NSHTTPURLResponse *)response completionHandler:(void (^)(NSURLRequest *))completionHandler { NSURL * url = [request URL]; if ([redirectURLs containsObject:url]) { - completionHandler(NULL); + completionHandler(nil); @synchronized(self->task) { self->task = nil; } @@ -168,6 +168,7 @@ didBecomeInvalidWithError:(NSError *)error { willCacheResponse:(NSCachedURLResponse *)proposedResponse completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler{ didComplete = YES; + completionHandler(nil); } - (void)URLSession:(NSURLSession *)session