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