ID:               44050
 Updated by:       [EMAIL PROTECTED]
 Reported By:      a dot candle at gmail dot com
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: slackware/debian
 PHP Version:      5.2.5
 New Comment:

Hello,

I have not been able to reproduce your issue. Can you please give us
more feedback about that? 


Previous Comments:
------------------------------------------------------------------------

[2008-02-05 17:37:48] a dot candle at gmail dot com

Description:
------------
When a client sends multiple 'Cookie' headers they appear to be parsed
incorrectly.


What I believe is happening is that the value part of the cookie
headers (after the ': ') are being concaternated with a comma rather
then a semicolon. Then (as per the cookie spec:
http://wp.netscape.com/newsref/std/cookie_spec.html) the resulting
string is being split on semicolon, resulting in the broken cookie
values.

Reproduce code:
---------------
php code:

<?php
setcookie("a", "aaaa");
setcookie("b", "bbbb");
setcookie("c", "cccc");
var_dump($_COOKIE);
?>

headers sent by client: (on the second request)

"Cookie: $Version=0; a=aaaa\r\n"
"Cookie: $Version=0; b=bbbb\r\n"
"Cookie: $Version=0; c=bbbb\r\n"


Expected result:
----------------
array(4) {
  ["$Version"]=>
  string(1) "0"
  ["a"]=>
  string(4) "aaaa"
  ["b"]=>
  string(4) "bbbb"
  ["c"]=>
  string(4) "cccc"
}

Actual result:
--------------
resulting output:

array(4) {
  ["$Version"]=>
  string(1) "0"
  ["a"]=>
  string(16) "aaaa, $Version=0"
  ["b"]=>
  string(16) "bbbb, $Version=0"
  ["c"]=>
  string(4) "cccc"
}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44050&edit=1

Reply via email to