develooper Front page | perl.libwww | Postings from December 2001

HTTP::Cookies Domain Issue

Thread Next
December 20, 2001 14:00
HTTP::Cookies Domain Issue
Message ID:
Hi Gisle,

while using HTTP::Cookies, I realized that it behaves differently than most 
browsers do: If a cookie is being written to a  "domain" which is actually a 
hostname like in

    Set-cookie: name=val; path=/;

all major browsers will accept this pseudo domain and replay the cookie to 
the hostname (like on HTTP::Cookie, however, will store 
the cookie's domain as "" and therefore *won't* replay it on 
Not sure if this is possibly even somewhat against the original cookie spec 
-- but if you want HTTP::Cookie to be compliant with the major browsers, I 
think line 340 in 

    $domain = ".$domain" unless $domain =~ /^\./;

has to be deleted. What do you think?

-- Mike

Mike Schilli

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About