Markus Wichitill wrote:
Stas Bekman wrote:

Index: t/filter/TestFilter/out_bbs_filebucket.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/out_bbs_filebucket.pm,v
retrieving revision 1.1
diff -u -r1.1 out_bbs_filebucket.pm
--- t/filter/TestFilter/out_bbs_filebucket.pm 13 Aug 2004 01:51:14 -0000 1.1
+++ t/filter/TestFilter/out_bbs_filebucket.pm 13 Aug 2004 17:24:19 -0000
@@ -58,6 +58,9 @@


     $r->content_type('text/plain');
     my $file = $r->args;
+    warn "file: $file\n";
+
+    $file =~ s|\\|/|g; # sendfile wants a unix style separator?

$r->sendfile($file);


The backslashes are URL-escaped, either of the following works:

$file =~ s|%5C|\\|g;
$file =~ s|%5C|/|g;

Excellent, committed. Thanks Markus.

I'm adding a better sendfile failure message, so it now tells which file it has failed to open :)

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to