Fixed #1553 Cached file name with path extension UIWebView issue - for iOS 7 and…
… above, remove the query from the url (prior to iOS 7 the behavior remains the same).
Showing
1 changed file
with
6 additions
and
0 deletions
@@ -56,8 +56,14 @@ | @@ -56,8 +56,14 @@ | ||
56 | return self.cacheKeyFilter(url); | 56 | return self.cacheKeyFilter(url); |
57 | } | 57 | } |
58 | else { | 58 | else { |
59 | + if (NSClassFromString(@"NSURLComponents")) { | ||
60 | + NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO]; | ||
61 | + urlComponents.query = nil; // Strip out query parameters. | ||
62 | + return urlComponents.string; | ||
63 | + } else { | ||
59 | return url.absoluteString; | 64 | return url.absoluteString; |
60 | } | 65 | } |
66 | + } | ||
61 | } | 67 | } |
62 | 68 | ||
63 | - (BOOL)cachedImageExistsForURL:(NSURL *)url { | 69 | - (BOOL)cachedImageExistsForURL:(NSURL *)url { |
-
mentioned in commit de149aed
-
Please register or login to post a comment