Changeset 28515 in webkit
- Timestamp:
- Dec 7, 2007 2:17:08 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r28513 r28515 1 2007-12-07 Alexey Proskuryakov <ap@webkit.org> 2 3 Reviewed by Darin. 4 5 http://bugs.webkit.org/show_bug.cgi?id=16325 6 <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work 7 8 * http/tests/misc/empty-cookie-expected.txt: Added. 9 * http/tests/misc/empty-cookie.html: Added. 10 1 11 2007-12-06 Alexey Proskuryakov <ap@webkit.org> 2 12 -
trunk/WebCore/ChangeLog
r28514 r28515 1 2007-12-07 Alexey Proskuryakov <ap@webkit.org> 2 3 Reviewed by Darin. 4 5 http://bugs.webkit.org/show_bug.cgi?id=16325 6 <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work 7 8 Test: http/tests/misc/empty-cookie.html 9 10 * platform/mac/CookieJar.mm: 11 (WebCore::setCookies): Don't store empty cookies. 12 (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set 13 with an earlier version of Leopard! 14 1 15 2007-12-06 Ada Chan <adachan@apple.com> 2 16 -
trunk/WebCore/platform/mac/CookieJar.mm
r17652 r28515 31 31 #import "PlatformString.h" 32 32 33 #import <wtf/RetainPtr.h> 34 35 #ifdef BUILDING_ON_TIGER 36 typedef unsigned int NSUInteger; 37 #endif 38 33 39 namespace WebCore { 34 40 … … 39 45 NSURL *URL = url.getNSURL(); 40 46 NSArray *cookiesForURL = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:URL]; 41 NSDictionary *header = [NSHTTPCookie requestHeaderFieldsWithCookies:cookiesForURL]; 47 48 // <rdar://problem/5632883> On 10.5, NSHTTPCookieStorage would happily store an empty cookie, which would be sent as "Cookie: =". 49 // We have a workaround in setCookies() to prevent that, but we also need to avoid sending cookies that were previously stored. 50 NSUInteger count = [cookiesForURL count]; 51 RetainPtr<NSMutableArray> cookiesForURLFilteredCopy(AdoptNS, [[NSMutableArray alloc] initWithCapacity:count]); 52 for (NSUInteger i = 0; i < count; ++i) { 53 NSHTTPCookie *cookie = (NSHTTPCookie *)[cookiesForURL objectAtIndex:i]; 54 if ([[cookie name] length] != 0) 55 [cookiesForURLFilteredCopy.get() addObject:cookie]; 56 } 57 58 NSDictionary *header = [NSHTTPCookie requestHeaderFieldsWithCookies:cookiesForURLFilteredCopy.get()]; 42 59 return [header objectForKey:@"Cookie"]; 43 60 … … 49 66 { 50 67 BEGIN_BLOCK_OBJC_EXCEPTIONS; 68 69 // <rdar://problem/5632883> On 10.5, NSHTTPCookieStorage would happily store an empty cookie, which would be sent as "Cookie: =". 70 if (cookieStr.isEmpty()) 71 return; 51 72 52 73 NSURL *URL = url.getNSURL();
Note: See TracChangeset
for help on using the changeset viewer.