From: | gregoa [...] cpan.org |
Subject: | HTTP::Cookies: save() ignores write errors |
We have the following bug reported to the Debian package of
HTTP-Cookies (https://bugs.debian.org/750850):
It doesn't seem to be a bug in the packaging, so you may want to take
a look. Thanks!
------8<-----------8<-----------8<-----------8<-----------8<-----
Package: libhttp-cookies-perl
Version: 6.00-2
This is how HTTP::Cookies::save() is implemented:
my $self = shift;
my $file = shift || $self->{'file'} || return;
local(*FILE);
open(FILE, ">$file") or die "Can't open $file: $!";
print FILE "#LWP-Cookies-1.0\n";
print FILE $self->as_string(!$self->{ignore_discard});
close(FILE);
1;
So it it dies when open() fails; but it doesn't do anything when close()
fails, so write errors (e.g. ENOSPC) are ignored.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64
Kernel: Linux 3.14-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libhttp-cookies-perl depends on:
ii libhttp-date-perl 6.02-1
ii libhttp-message-perl 6.06-1
ii perl 5.18.2-4
--
Jakub Wilk
------8<-----------8<-----------8<-----------8<-----------8<-----
Thanks for considering,
gregor herrmann,
Debian Perl Group