Open oalders opened 7 years ago
As per the code in the first post:
!/usr/bin/perl -w
use strict; use HTTP::Cookies; use HTTP::Response; use HTTP::Request; my $cookie_jar = new HTTP::Cookies; my $request = HTTP::Request->new(GET => 'http://www.en.com/'); my $response = HTTP::Response->parse("HTTP/1.1 302 Moved\r\nSet-Cookie: expires=10101\r\n\r\n"); $response->request($request); $cookie_jar->extract_cookies($response); print $cookie_jar->as_string();
__END__
Executing this with perl5 (revision 5 version 22 subversion 4) with HTTP::Cookies version 6.01 returns the following:
Set-Cookie3: expires=10101; path="/"; domain=www.en.com; discard; version=0
Migrated from rt.cpan.org#8108 (status was 'open')
Requestors:
From on 2004-10-24 22:56:15:
From on 2004-10-25 07:08:53:
From on 2006-05-27 00:23:30:
From on 2006-05-27 02:04:56:
From ether@cpan.org on 2017-01-25 21:38:50: