// This is /1.php
// Suppose a cookie is set with:
setcookie('foo', 'bar', time() + 86400, '/', '.zend.com');
// With a dot prepended to zend.com, the cookie is also made available to all subdomains.
// This is /2.php
var_dump($_COOKIE);
// test.php
$request = new Zend_Http_Client();
$request->setCookieJar();
$request->setUri('http://zend.com/1.php');
$request->request();
$request->setUri('http://zend.com/2.php');
$response = $request->request();
echo $response->getBody();
// Output from the var_dump() in /2.php:
// array(0) {
// }
Comments
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-12-11T19:01:47.000+0000
Set component and auto reassign
Posted by Eric Yao (sourceboy) on 2008-12-11T20:37:29.000+0000
Zend_Http_Cookie::match() also doesn't match due to the same cause.
Posted by Eric Yao (sourceboy) on 2008-12-11T20:40:04.000+0000
These modifications seem to have fixed them:
Posted by Shahar Evron (shahar) on 2009-07-25T14:11:21.000+0000
Congrats, fixed in rev. 17079 - thanks for reporting and for the patience :)
Posted by Satoru Yoshida (satoruyoshida) on 2009-11-17T22:56:44.000+0000
I set fix version. I find this at SVN r17118 in 1.9 branch.