From e695e8ac22a8937d7f0cd8807220d3f328c60272 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk Date: Fri, 19 Feb 2021 19:41:27 +0300 Subject: [PATCH] [qt][downloader] Allow http redirect on Mac Signed-off-by: Roman Tsisyk --- platform/http_thread_apple.mm | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/platform/http_thread_apple.mm b/platform/http_thread_apple.mm index 95fc9432b3..0647235fea 100644 --- a/platform/http_thread_apple.mm +++ b/platform/http_thread_apple.mm @@ -125,21 +125,6 @@ static id downloadIndicator = nil; return self; } -/// We cancel and don't support any redirects to avoid data corruption -/// @TODO Display content to user - router is redirecting us somewhere -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -willPerformHTTPRedirection:(NSHTTPURLResponse *)response - newRequest:(NSURLRequest *)request - completionHandler:(void (^)(NSURLRequest *))completionHandler -{ - LOG(LWARNING, ("Canceling because of redirect from", response.URL.absoluteString.UTF8String, "to", - request.URL.absoluteString.UTF8String)); - completionHandler(nil); - m_callback->OnFinish(static_cast(response).statusCode, m_begRange, - m_endRange); -} - /// @return -1 if can't decode + (int64_t)getContentRange:(NSDictionary *)httpHeader { -- 2.45.3