Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: GWOLF [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.20
Fixed in: 0.21



Subject: save filter "filename" parameter used invalidly
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1202483839-25265-4"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 997
Download (untitled) / with headers
text/plain 997b
Hi, I'm forwarding this bug to CPAN's RT as it was filed in Debian's BTS - For further information or direct contact with the original submitter, please refer to: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433951 The patch I'm attaching here contains both of the submitted patches. Thanks, ----------------------------------------- Hi, consider the attached patch. It adopts the code to the documentation (see inline pod). bye, Roland Further info: The "filename" member should be a function, as documented, not a further indirection. Hi, I'm attaching an additional (incremental) patch that fixes additional use of the filename. It is only initialized there as a string without being used as such. Therefore, this should be removed to not confuse the other use of it (as a code reference). Looks like this part of the code has never been tested before. ;) (A colleague of mine discovered this, feel free to ask me if the issue (and resolution) is still unclear.) bye, Roland
Subject: libhttp-proxy-perl.diff
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1202483839-25265-3"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; name="libhttp-proxy-perl.diff"
Content-Disposition: inline; filename="libhttp-proxy-perl.diff"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 1154
Index: lib/HTTP/Proxy/BodyFilter/save.pm =================================================================== --- lib/HTTP/Proxy/BodyFilter/save.pm (revision 14625) +++ lib/HTTP/Proxy/BodyFilter/save.pm (working copy) @@ -58,7 +58,7 @@ my $file = ''; if( defined $self->{_hpbf_save_filename} ) { # use the user-provided callback - $file = &{ $self->{_hpbf_save_filename} }->($message); + $file = &{ $self->{_hpbf_save_filename} }($message); unless ( defined $file and $file ne '' ) { $self->proxy->log( HTTP::Proxy::FILTERS, "HTBF::save", "Filter will not save $uri" ); @@ -92,7 +92,6 @@ $file = File::Spec->rel2abs( $file ); # internal data initialisation - $self->{_hpbf_save_filename} = ""; $self->{_hpbf_save_fh} = undef; # create the directory @@ -132,7 +131,6 @@ } # we have an open filehandle - $self->{_hpbf_save_filename} = $file.$ext; binmode( $self->{_hpbf_save_fh} ); # for Win32 and friends $self->proxy->log( HTTP::Proxy::FILTERS, "HPBF::save", "Saving $uri to $file$ext" );
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-18319-1208657547-310.33018-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 631
Download (untitled) / with headers
text/plain 631b
On Fri Feb 08 10:17:24 2008, GWOLF wrote: Show quoted text
> > I'm forwarding this bug to CPAN's RT as it was filed in Debian's BTS - > For further information or direct contact with the original submitter, > please refer to: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433951 > > The patch I'm attaching here contains both of the submitted patches. >
Thanks for the reports. This and other problems with HTTP::Proxy::BodyFilter::save have prompted me to write a comprehensive test suite for it. This bug and a few others have been fixed. These fixes will be available in version 0.21, which should appear on CPAN very soon. -- BooK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.