You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cookie:
Set-Cookie: dotdomain=1; path=/; domain=.moikrug.ru
not passed to request:
GET http://moikrug.ru/
Additional tests for t/base/cookies.t included.
I confirm the problem. RFC 2965 does not have concrete example of
matching "domain.com" against ".domain.com".
The current workaround is to specify "host" header separately:
my $ua = LWP::UserAgent->new();
my $cookie = HTTP::Cookies->new(
file => '/tmp/cookies.txt',
autosave => 1
);
my $r = HTTP::Request::Common::GET('http://host.com', host =>
'www.host.com');
$ua->prepare_request($r);
$cookie->add_cookie_header($r);
print Data::Dumper->Dump([\$r], ["r"]);
Sergey, if you have a patch for Cookies.pm, you are welcome to attach it.
Simple solution to this problem is simply to add the following line in the sub add_cookie_header right after the line:
$domain = "$domain.local" unless $domain =~ /./;
you add:
$domain = ".$domain" unless( $domain =~ /^./ );
and problem solved.
Migrated from rt.cpan.org#49898 (status was 'open')
Requestors:
Attachments:
From [email protected] on 2009-09-22 05:18:09:
From [email protected] on 2010-08-08 20:23:44:
From [email protected] on 2017-01-25 21:39:08:
The text was updated successfully, but these errors were encountered: