You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2003/01/01 04:47:37 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm

stas        2002/12/31 19:47:37

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
  Log:
  Add PerlPreConnectionHandler support in Apache::Test
  
  Revision  Changes    Path
  1.60      +11 -5     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- TestConfigPerl.pm	13 Dec 2002 10:58:40 -0000	1.59
  +++ TestConfigPerl.pm	1 Jan 2003 03:47:37 -0000	1.60
  @@ -148,15 +148,21 @@
           $self->server->version_of(\%sethandler_modperl);
   }
   
  +sub set_connection_handler {
  +    my($self, $module, $args) = @_;
  +    my $port = $self->new_vhost($module);
  +    $self->postamble(Listen => $port);
  +}
  +
   my %add_hook_config = (
  -    Response => \&set_handler,
  -    ProcessConnection => sub { my($self, $module, $args) = @_;
  -                               my $port = $self->new_vhost($module);
  -                               $self->postamble(Listen => $port); },
  +    Response          => \&set_handler,
  +    ProcessConnection => \&set_connection_handler,
  +    PreConnection     => \&set_connection_handler,
   );
   
   my %container_config = (
       ProcessConnection => \&vhost_container,
  +    PreConnection     => \&vhost_container,
   );
   
   sub location_container {
  @@ -279,7 +285,7 @@
   $hooks{Protocol} = 'ProcessConnection';
   $hooks{Filter}   = 'OutputFilter';
   
  -my @extra_subdirs = qw(Response Protocol Hooks Filter);
  +my @extra_subdirs = qw(Response Protocol PreConnection Hooks Filter);
   
   # add the subdirs to @INC early, in case mod_perl is started earlier
   sub configure_pm_tests_inc {