libwww-perl / libwww-perl/HTTP-Cookies
HTTP::Cookies don't add ".domain" cookies to "domain" requests [rt.cpan.org #49898]
Open
@simbabque is already working on this.
Since May 1, 2025.
- Dominant language
- Perl
- Stars
- 4
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Migrated from rt.cpan.org#49898 (status was 'open')
Requestors:
- HSW@cpan.org
Attachments:
From hsw@cpan.org on 2009-09-22 05:18:09:
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.
From dma_k@mail.ru on 2010-08-08 20:23:44:
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.
From ether@cpan.org on 2017-01-25 21:39:08:
migrated queues: libwww-perl -> HTTP-Cookies
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.