Steps to reproduce: 1. Open http://www.xerox.ru/Themes/basic/products-index.asp?Folder=739 2. Refresh. Results: an error page is displayed. This is caused by document.cookie="" on the page. An empty cookie is stored by NSHTTPCookieStorage and then transmitted as "Cookie: =". This is a regression in Leopard. I'm not sure if it should be considered an NSHTTPCookieStorage bug, but I have a workaround anyway.
I think you should definitely file a Radar for the underlying issue.
Created attachment 17747 [details] proposed fix I'm not particularly happy about having to check for empty cookies all the time - but I don't see a better way.
Filed <rdar://problem/5632883> for the NSHTTPCookieStorage issue (yes, I will add a comment to code when landing :) ).
<rdar://problem/5632997>
Comment on attachment 17747 [details] proposed fix r=me
Created attachment 17767 [details] revised fix Oops, noticed a couple of problems when landing: - Fixed Tiger build (no NSUInteger there). - I didn't really use cookiesForURLFilteredCopy. I could get away with that because the invalid cookie was a per-session one, and didn't need to be filtered out. I'm not sure if we have a real problem with persistent cookies, but I preserved filtering to be safe. I think I need a new review.
Comment on attachment 17767 [details] revised fix Our usual approach with NSUInteger is to define it somewhere inside BUILDING_ON_TIGER rather than just using unsigned. See mac/Misc/WebTypesInternal.h for that in WebKit. Normally we try to avoid autorelease unless we are forced to use it. So we'd typically use a RetainPtr or plain old retain/release on the NSMutableArray. r=me
Committed revision 28515. (In reply to comment #7) > (From update of attachment 17767 [details] [edit]) > Our usual approach with NSUInteger is to define it somewhere inside > BUILDING_ON_TIGER rather than just using unsigned. See > mac/Misc/WebTypesInternal.h for that in WebKit. Done (just defined it in CookieJar.mm). I also noticed WebNSUInteger, which is WebKit-only, too. > Normally we try to avoid autorelease unless we are forced to use it. So we'd > typically use a RetainPtr or plain old retain/release on the NSMutableArray. Done.