Merge pull request #1657 from mackoj/master

Add support for downloading images behind redirect
This commit is contained in:
Bogdan Poplauschi 2016-09-30 22:34:54 +03:00 committed by GitHub
commit 02a9eab4b5
1 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,11 @@ didReceiveResponse:(NSURLResponse *)response
[dataOperation URLSession:session task:task didCompleteWithError:error];
}
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler {
completionHandler(request);
}
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler {
// Identify the operation that runs this task and pass it the delegate method