Bug 26880

Summary: Cookies with a name of 'domain' not handled correctly
Product: WebKit Reporter: Lutz Petersen <lutzp>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal Keywords: HasReduction, InRadar, ReviewedForRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: Mac OS X 10.5   
URL: http://n.ethz.ch/~lutzp/test.php

Description Lutz Petersen 2009-07-01 02:10:56 PDT
When a website tries to set a cookie with a name of 'domain' (apostrophes not included), WebKit capitalizes the name and sets a cookie called 'Domain'. This does not happen for differently named cookies. E.g. setting a cookie called 'domains' works as expected.

Steps to reproduce:

1. Go to the URL provided with this bug report.
2. Verify that neither the 'domain' nor the 'Domain' cookies are set.
3. Click the "Set 'domain' cookie" button. This instructs the web server to generate a corresponding Set-Cookie header.
4. Reload the page and check the cookie values that your browser provides to the web server.

Expected behavior:

The 'domain' cookie should be set to a value of 1, whereas the 'Domain' cookie should be left untouched, i.e. unset.

WebKit behavior:

WebKit sets the 'Domain' cookie instead of the 'domain' cookie.
Comment 1 Mark Rowe (bdash) 2009-07-01 10:23:55 PDT