ZF-9036: Cookies from hosts starting with a dot are inaccessible with getCookie()

Issue Type: Bug Created: 2010-02-01T06:02:00.000+0000 Last Updated: 2012-11-20T21:37:45.000+0000 Status: Open Fix version(s): Reporter: R Slootjes (rslootjes) Assignee: None Tags: - Zend_Http_CookieJar

  • Zend_Uri

Related issues: Attachments:


I am building a simple tool which can access the contactlist from a MSN Live account but something is bugging me. I am using a Zend_Http_Client object to do all the calls and I am using the Zend_Http_Cookiejar to store cookies in. During the calls the cookies get properly saved with host "" so they are accessible from all subdomains. I tried getting the cookie by:

<pre class="highlight">
$cookiejar = $client->getCookieJar();
$authcookie = $cookiejar->getCookie('<a href=""></a>', 'MSPAuth');

This gives me an Exception with "Invalid URI supplied" as message. When i remove the dot from the URI I don't get an exception but the CookieJar won't return the cookie since the host doesnt match ( != When I remove the check for the hostname in Zend_Uri the "" hostname is working fine like this:

<pre class="highlight">
$uri = Zend_Uri::factory();
$authcookie = $cookiejar->getCookie($uri, 'MSPAuth');

Please fix, tnx :)


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.