Some web servers return domain=.foo.bar.com.  HTTP::Cookies will miss
these cookies for URLs of the form http://foo.bar.com
The patch below fixes this problem.

Rob

P.S. Apologies if this has already been fixed.
----------------------------------------------------------------
Base HTTP::Cookies::Version is 1.25

diff -c -r1.1 -r1.2
*** Cookies.pm  2002/09/04 17:25:21     1.1
--- Cookies.pm  2002/09/04 19:37:03     1.2
***************
*** 104,109 ****
--- 104,110 ----
      my $url = $request->url;
      my $domain = _host($request, $url);
      $domain = "$domain.local" unless $domain =~ /\./;
+     $domain =~ s/^(?=[^\.])/./;
      my $secure_request = ($url->scheme eq "https");
      my $req_path = _url_path($url);
      my $req_port = $url->port;

Reply via email to