#27267 [NEW]: can't set cookies with points (.) and spaces ( )

From: Date: Mon, 16 Feb 2004 01:11:09 +0000
Subject: #27267 [NEW]: can't set cookies with points (.) and spaces ( )
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54974@lists.php.net to get a copy of this message
From: silkensedai at online dot fr Operating system: Linux Mandrake 9.2 + cooker PHP version: 4.3.4 PHP Bug Type: HTTP related Bug description: can't set cookies with points (.) and spaces ( ) Description: ------------ When we set a cookie with the function setcookie() and when the cookie name have spaces " " or points ".", these characters are replaced by underscures '_'. I think that can be fix by urlencodind points (%2E) and spaces (%20). Reproduce code: --------------- <?php setcookie('cookie_name.with spaces', 'value', time()+10000); ?> <pre><?php print_r($_COOKIE); ?></pre> <a href='#'>Reload</a> Expected result: ---------------- =========== First time: =========== Array ( ) Reload ============ Second time: ============ Array ( [cookie_name.with spaces] => value ) Reload Actual result: -------------- =========== First time: =========== Array ( ) Reload ============ Second time: ============ Array ( [cookie_name_with_spaces] => value ) Reload -- Edit bug report at http://bugs.php.net/?id=27267&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27267&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27267&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27267&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27267&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27267&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27267&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27267&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27267&r=support Expected behavior: http://bugs.php.net/fix.php?id=27267&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27267&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27267&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27267&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27267&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27267&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27267&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27267&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27267&r=float

« previous php.bugs (#54974) next »