stas 2003/08/29 10:50:06
Modified: t/filter/TestFilter in_bbs_msg.pm
Log:
use Apache::TestTrace::debug, so we can optionally turn the tracing on
Revision Changes Path
1.3 +6 -3 modperl-2.0/t/filter/TestFilter/in_bbs_msg.pm
Index: in_bbs_msg.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_bbs_msg.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- in_bbs_msg.pm 18 Apr 2003 06:18:57 -0000 1.2
+++ in_bbs_msg.pm 29 Aug 2003 17:50:06 -0000 1.3
@@ -13,13 +13,15 @@
use Apache::Const -compile => 'OK';
use APR::Const -compile => ':common';
+use Apache::TestTrace;
+
my $from_url = '/input_filter.html';
my $to_url = '/TestFilter__in_bbs_msg';
sub handler : FilterConnectionHandler {
my($filter, $bb, $mode, $block, $readbytes) = @_;
- #warn "FILTER CALLED\n";
+ debug "FILTER CALLED";
my $c = $filter->c;
my $ctx_bb = APR::Brigade->new($c->pool, $c->bucket_alloc);
@@ -36,19 +38,20 @@
$bucket->remove;
if ($bucket->is_eos) {
- #warn "EOS!!!!";
+ debug "EOS!!!";
$bb->insert_tail($bucket);
last;
}
my $status = $bucket->read($data);
- #warn "FILTER READ: $data\n";
+ debug "FILTER READ:\n$data";
if ($status != APR::SUCCESS) {
return $status;
}
if ($data and $data =~ s,GET $from_url,GET $to_url,) {
+ debug "GET line rewritten to be:\n$data";
$bucket = APR::Bucket->new($data);
}