If the site is http://foo.com, http://www.foo.com should work, as you are implying that foo.com is a single host domain. Also, I wonder about three dots e.g. http://myhost.foo.co.uk
On the more general subject of cookies, nms have just released a strengthened replacement for Matt Wright's cookie lib.
Comment on Re: HTTP::cookies and URLs with only one dot?