Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP::Cookies: save() ignores write errors [rt.cpan.org #105216] #25

Closed
oalders opened this issue Mar 30, 2017 · 2 comments
Closed

HTTP::Cookies: save() ignores write errors [rt.cpan.org #105216] #25

oalders opened this issue Mar 30, 2017 · 2 comments

Comments

@oalders
Copy link
Member

oalders commented Mar 30, 2017

Migrated from rt.cpan.org#105216 (status was 'new')

Requestors:

From gregoa@cpan.org on 2015-06-13 18:20:46:

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
@jwilk
Copy link

jwilk commented Sep 24, 2019

I believe this was fixed in PR #46.

@oalders
Copy link
Member Author

oalders commented Oct 1, 2019

Thanks for updating this ticket @jwilk!

Closed via #46

@oalders oalders closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants