- fixed <rdar://problem/
5249730> REGRESSION (Leopard, around 9A464): Safari opens the same local
documents more than once due to canonicalization change
* loader/mac/LoaderNSURLExtras.m:
(canonicalURL):
pass URL through KURL so we get KURL's version of canonicalization as well as
NSURLProtocol's version of canonicalization
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23949
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-03 John Sullivan <sullivan@apple.com>
+
+ Written by Darin, reviewed by me
+
+ - fixed <rdar://problem/5249730> REGRESSION (Leopard, around 9A464): Safari opens the same local
+ documents more than once due to canonicalization change
+
+ * loader/mac/LoaderNSURLExtras.m:
+ (canonicalURL):
+ pass URL through KURL so we get KURL's version of canonicalization as well as
+ NSURLProtocol's version of canonicalization
+
2007-07-03 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
{
if (!url)
return nil;
-
+
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
Class concreteClass = wkNSURLProtocolClassForReqest(request);
if (!concreteClass) {
return url;
}
- NSURL *result = nil;
+ // Get NSURLProtocol's idea of canonical URL
NSURLRequest *newRequest = [concreteClass canonicalRequestForRequest:request];
- NSURL *newURL = [newRequest URL];
- result = [[newURL retain] autorelease];
+ KURL newURL = [newRequest URL];
[request release];
- return result;
+ // pass through KURL to get KURL's idea of canonical URL
+ return newURL.getNSURL();
}
static bool vectorContainsString(Vector<String> vector, String string)