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).
This commit is contained in:
parent
b5a504f326
commit
fb0cdb6dc4
|
|
@ -56,7 +56,13 @@
|
||||||
return self.cacheKeyFilter(url);
|
return self.cacheKeyFilter(url);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return url.absoluteString;
|
if (NSClassFromString(@"NSURLComponents")) {
|
||||||
|
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
|
||||||
|
urlComponents.query = nil; // Strip out query parameters.
|
||||||
|
return urlComponents.string;
|
||||||
|
} else {
|
||||||
|
return url.absoluteString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue