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

Description

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 ".live.com" so they are accessible from all subdomains. I tried getting the cookie by:


$cookiejar = $client->getCookieJar();
$authcookie = $cookiejar->getCookie('http://.live.com', '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 (live.com != .live.com). When I remove the check for the hostname in Zend_Uri the ".live.com" hostname is working fine like this:


$uri = Zend_Uri::factory();
$uri->setHost('.live.com');
$authcookie = $cookiejar->getCookie($uri, 'MSPAuth');

Please fix, tnx :)

Comments

No comments to display