From de149aedaa8915463900f427e0c9fc9a12e2ca26 Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Tue, 7 Jun 2016 11:56:31 +0300 Subject: [PATCH] Reverted all the changes for "Removed the URL query params from the filename (key)" fb0cdb6d 1bf62d4 #1584 - fixes #1433 #1553 #1583 #1585 This is a deal breaker for people. The solution for those issues (i.e. very long urls) is to set the SDWebImageManager cacheKeyFilter block and do their own calculations there. --- CHANGELOG.md | 2 +- SDWebImage/SDWebImageManager.m | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index adefeb16..bb2bd43f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ #### Fixes: -- Removed the URL query params from the filename (key) fb0cdb6d 1bf62d4 #1584 - fixes #1433 #1533 #1583 #1585 +- Removed the URL query params from the filename (key) fb0cdb6d 1bf62d4 #1584 - fixes #1433 #1553 #1583 #1585 - Fixed the WebP build with the official 1.0.0 CocoaPods release f1a471e - fixes #1444 - Updated doc: `removeImageForKey:` not synchronous e6e5c51 - fixes #1379 #1415 diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index cdfa1fc9..d331a4a5 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -61,13 +61,7 @@ if (self.cacheKeyFilter) { return self.cacheKeyFilter(url); } else { - if (NSClassFromString(@"NSURLComponents") && [NSURLComponents instancesRespondToSelector:@selector(string)]) { - NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO]; - urlComponents.query = nil; // Strip out query parameters. - return [urlComponents.URL absoluteString]; - } else { - return [url absoluteString]; - } + return [url absoluteString]; } }