Skip Menu |

This queue is for tickets about the HTTP-Proxy CPAN distribution.

Report information
The Basics
Id: 14548
Status: resolved
Priority: 0/
Queue: HTTP-Proxy

People
Owner: book [...] cpan.org
Requestors: corion [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.21



Date: Sun, 11 Sep 2005 20:11:38 +0200
From: Max Maischein <corion [...] cpan.org>
To: bug-HTTP-Proxy [...] rt.cpan.org
Subject: Bug in HTTP::Proxy::BodyFilter::save v0.16
Hello Philippe, HTTP::Proxy::BodyFilter::save has a bug in its parameter validation - it doesn't accept any C<filename> parameter, because the check is reversed: croak "filename must be a code reference" if defined $args{filename} && UNIVERSAL::isa($args{filename}, 'CODE'); should be croak "filename must be a code reference" if defined $args{filename} && ! UNIVERSAL::isa($args{filename}, 'CODE'); The attached test file replicates the bug and tests that it goes away :) Another documentation nitpick is that the documentation for HTTP::Proxy::BodyFilter::save doesn't tell that the default mime_type is "text/*" and you need to override that for other formats. Thanks for writing HTTP::Proxy, -max
Sorry to reply so late to your bug request. On Sun Sep 11 13:57:23 2005, CORION wrote: Show quoted text
> Hello Philippe, > > HTTP::Proxy::BodyFilter::save has a bug in its parameter validation - it > doesn't accept any C<filename> parameter, because the check is reversed: > > croak "filename must be a code reference" > if defined $args{filename} && UNIVERSAL::isa($args{filename}, > 'CODE'); > > should be > > croak "filename must be a code reference" > if defined $args{filename} && ! UNIVERSAL::isa($args{filename}, > 'CODE'); > > The attached test file replicates the bug and tests that it goes away :)
I couldn't find the "attached file" in RT.
On Tue Mar 21 03:49:40 2006, guest wrote: Show quoted text
> Sorry to reply so late to your bug request. > > On Sun Sep 11 13:57:23 2005, CORION wrote:
> > Hello Philippe, > > > > HTTP::Proxy::BodyFilter::save has a bug in its parameter validation
- it Show quoted text
> > doesn't accept any C<filename> parameter, because the check is reversed:
Fixed in 0.21. -- BooK