Hans Ecke <[EMAIL PROTECTED]> writes:

> Hi all,
> 
> below you find a patch to HTTP::Cookies::Netscape::load() that allows 
> the module to accept cookie files made by Mozilla, not only Netscape.

Thank you!

> Why: In most systems, Netscape version 4 and below are phased out or not 
> installed anymore. Instead, people use Netscape version 6/7 or Mozilla. 
> It is therefore important to update Perl's cookie file handling code to 
> understand and correctly process Mozilla cookie files.
> 
> I found this bug in an open-source perl application I maintain that 
> requires cookie support. Because of the bug, I have to distribute my own 
> version of Cookies.pm.
> 
> Any reason this should not be included in the standard distribution?

This patch seems to already be in the current source.  Perhaps
something Sean put in?

Regards,
Gisle

> --- Cookies.pm.old      2002-11-13 10:02:51.000000000 -0700
> +++ Cookies.pm  2002-11-13 09:53:59.000000000 -0700
> @@ -742,7 +742,7 @@
>      my @cookies;
>      open(FILE, $file) || return;
>      my $magic = <FILE>;
> -    unless ($magic =~ /^\# Netscape HTTP Cookie File/) {
> +    unless ($magic =~ /^\# (?:Netscape )?HTTP Cookie File/) {
>         warn "$file does not look like a netscape cookies file" if $^W;
>         close(FILE);
>         return;

Reply via email to