Summary: | CFNetwork cache partitioning does not work properly on subdomains | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vicki Pfau <jeffrey+webkit> | ||||
Component: | Page Loading | Assignee: | Vicki Pfau <jeffrey+webkit> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ddkilzer, japhet, mjs, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Vicki Pfau
2013-03-07 13:51:16 PST
Created attachment 192082 [details]
Patch
Comment on attachment 192082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192082&action=review r=me > Source/WebCore/platform/network/mac/ResourceRequestMac.mm:193 > + String partition = cachePartition(); > + if (!partition.isNull() && !partition.isEmpty()) > + [NSURLProtocol setProperty:[NSString stringWithUTF8String:partition.utf8().data()] forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; This would be easier to read if you pulled out the UTF-8 string conversion as a separate local variable: NSString *partitionValue = [NSString stringWithUTF8String:partition.utf8().data()]; [NSURLProtocol setProperty:partitionValue forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; Committed r145161: <http://trac.webkit.org/changeset/145161> Comment on attachment 192082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192082&action=review >> Source/WebCore/platform/network/mac/ResourceRequestMac.mm:193 >> + [NSURLProtocol setProperty:[NSString stringWithUTF8String:partition.utf8().data()] forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; > > This would be easier to read if you pulled out the UTF-8 string conversion as a separate local variable: > > NSString *partitionValue = [NSString stringWithUTF8String:partition.utf8().data()]; > [NSURLProtocol setProperty:partitionValue forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; Why is UTF-8 involved at all? Why not just cachedPartition().nsString()? (In reply to comment #5) > (From update of attachment 192082 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=192082&action=review > > >> Source/WebCore/platform/network/mac/ResourceRequestMac.mm:193 > >> + [NSURLProtocol setProperty:[NSString stringWithUTF8String:partition.utf8().data()] forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; > > > > This would be easier to read if you pulled out the UTF-8 string conversion as a separate local variable: > > > > NSString *partitionValue = [NSString stringWithUTF8String:partition.utf8().data()]; > > [NSURLProtocol setProperty:partitionValue forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest]; > > Why is UTF-8 involved at all? Why not just cachedPartition().nsString()? It's an unfortunate workaround for <rdar://problem/13361941>, which CFNetwork has said they're not going to fix. |