[Apache-dispatch-devel] SF.net SVN: apache-dispatch: [38] trunk/t/conf
Brought to you by:
geoffrey_young,
phred_moyer
|
From: <phr...@us...> - 2006-06-06 06:32:19
|
Revision: 38 Author: phred_moyer Date: 2006-06-05 23:32:15 -0700 (Mon, 05 Jun 2006) ViewCVS: http://svn.sourceforge.net/apache-dispatch/?rev=38&view=rev Log Message: ----------- - all tests passing under mp1 and mp2. Modified Paths: -------------- trunk/lib/Apache/Dispatch.pm trunk/lib/Apache2/Dispatch.pm trunk/t/conf/extra.last.conf.in trunk/t/lib/Apache2/Foo/Bar.pm Modified: trunk/lib/Apache/Dispatch.pm =================================================================== --- trunk/lib/Apache/Dispatch.pm 2006-06-06 06:30:00 UTC (rev 37) +++ trunk/lib/Apache/Dispatch.pm 2006-06-06 06:32:15 UTC (rev 38) @@ -74,7 +74,7 @@ my $autoload = $dcfg->{_autoload}; my $stat = $dcfg->{_stat}; my $prefix = $dcfg->{_prefix}; - my $uppercase = $dcfg->{_uppercase}; + my $uppercase = $dcfg->{_uppercase} || 'Off'; my $new_location = $dcfg->{_newloc}; my $require = $dcfg->{_require}; my @parents = $dcfg->{_isa} ? @{$dcfg->{_isa}} : (); @@ -99,6 +99,7 @@ # that other filters in the chain recognize us... $r->dir_config->set(Filter => 'On'); + $r = $r->filter_register; $log = $r->server->log; } Modified: trunk/lib/Apache2/Dispatch.pm =================================================================== --- trunk/lib/Apache2/Dispatch.pm 2006-06-06 06:30:00 UTC (rev 37) +++ trunk/lib/Apache2/Dispatch.pm 2006-06-06 06:32:15 UTC (rev 38) @@ -37,10 +37,6 @@ $dcfg = Apache2::Module::get_config(__PACKAGE__, $r->server, $r->per_dir_config); - my $filter = $dcfg->{_filter} - || $r->dir_config('Filter') - || 0; - my $debug = $dcfg->{_debug} || 0; my $autoload = $dcfg->{_autoload}; my $stat = $dcfg->{_stat}; @@ -61,19 +57,6 @@ $log->debug("Using Apache2::Dispatch"); - if ($filter) { - $log->debug("\tregistering handler with Apache::Filter"); - - require Apache2::Filter; - - # in case we used DispatchFilter directive instead, make sure - # that other filters in the chain recognize us... - $r->dir_config->set(Filter => 'On'); - - $r = $r->filter_register; - $log = $r->server->log; - } - $log->debug("\tchecking $uri for possible dispatch...") if $debug > 1; @@ -95,8 +78,6 @@ $uppercase, "\n\t\tDispatchStat: ", $stat, - "\n\t\tDispatchFilter: ", - $filter, "\n\t\tDispatchDebug: ", $debug, "\n\t\tDispatchLocation: ", @@ -478,28 +459,6 @@ without further modification. See the Eagle book on method handlers for more details. -=head1 FILTERING - -Apache2::Dispatch provides for output filtering using Apache::Filter -1.013 and above. - - <Location /Foo> - SetHandler perl-script - PerlHandler Apache2::Dispatch Apache::Compress - - DispatchPrefix Bar - DispatchFilter On - </Location> - -Your handler need do nothing special to make its output the start of -the chain - Apache2::Dispatch registers itself with Apache::Filter and -hides the task from your handler. Thus, any dispatched handler is -automatically Apache::Filter ready without the need for additional -code. - -The only caveat is that you must use the request object that is passed -to the handler and not get it directly using Apache->request. - =head1 AUTOLOAD Support for AUTOLOAD has been made optional, but requires special Modified: trunk/t/conf/extra.last.conf.in =================================================================== --- trunk/t/conf/extra.last.conf.in 2006-06-06 06:30:00 UTC (rev 37) +++ trunk/t/conf/extra.last.conf.in 2006-06-06 06:32:15 UTC (rev 38) @@ -24,13 +24,13 @@ SetHandler perl-script DispatchFilter On DispatchRequire On - DispatchExtras Pre Post DispatchDebug 2 <IfDefine APACHE2> DispatchPrefix Apache2::Foo PerlResponseHandler Apache2::Dispatch Apache2::Foo::Filter </IfDefine> <IfDefine APACHE1> + PerlModule Apache::Filter DispatchPrefix Apache::Foo PerlHandler Apache::Dispatch Apache::Foo::Filter </IfDefine> Modified: trunk/t/lib/Apache2/Foo/Bar.pm =================================================================== --- trunk/t/lib/Apache2/Foo/Bar.pm 2006-06-06 06:30:00 UTC (rev 37) +++ trunk/t/lib/Apache2/Foo/Bar.pm 2006-06-06 06:32:15 UTC (rev 38) @@ -9,15 +9,15 @@ @Foo::Bar::ISA = qw(Apache2::Foo::Foo); -sub dispatch_index { +#sub dispatch_index { # test calls to /Bar/index or / - my ($class, $r) = @_; - $r->log_debug(__PACKAGE__ . "->dispatch_index()"); +# my ($class, $r) = @_; +# $r->log_debug(__PACKAGE__ . "->dispatch_index()"); - $r->content_type('text/plain'); - $r->print(__PACKAGE__ . "->dispatch_index()"); - return Apache2::Const::OK; -} +# $r->content_type('text/plain'); +# $r->print(__PACKAGE__ . "->dispatch_index()"); +# return Apache2::Const::OK; +#} sub dispatch_baz { my ($class, $r) = @_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |