Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 29401
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.803
Fixed in: (no value)



Subject: HTTP::Cookies handle malformed empty Set-Cookie badly
Some cookie libraries have been known to generate empty cookie headers, for example. Set-Cookie: cookie content as normal Set-Cookie: Normal behaviour for browsers is to discard the empty Set-Cookie header. HTTP::Cookies instead generates several warnings, and then returns an invalid cookie loosely equivalent to Set-Cookie: Discard= The attached one-line patch will skip make HTTP::Cookies skip any cookie headers which provide no keys.
Subject: cookies.patch
--- /usr/lib/perl5/site_perl/5.8.5/HTTP/Cookies.pm 2004-11-12 21:07:41.000000000 +1100 +++ Cookies.pm 2007-09-17 15:48:22.000000000 +1000 @@ -240,6 +240,7 @@ } $first_param = 0; } + next unless @cur; next if $in_set2{$cur[0]}; # push(@cur, "Port" => $req_port);
Applied (with test). Thanks!