httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm
Date Sat, 17 Nov 2001 02:23:10 GMT
dougm       01/11/16 18:23:10

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
  Log:
  configure the vhost servername and port so redirects and $ENV{SERVER_PORT}
  have the correct values
  
  Revision  Changes    Path
  1.85      +15 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- TestConfig.pm	2001/11/17 02:09:30	1.84
  +++ TestConfig.pm	2001/11/17 02:23:10	1.85
  @@ -726,6 +726,19 @@
       s/@(\w+)@/$self->{vars}->{lc $1}/g;
   }
   
  +#need to configure the vhost port for redirects and $ENV{SERVER_PORT}
  +#to have the correct values
  +my %servername_config = (
  +    1 => sub {
  +        my($name, $port) = @_;
  +        [ServerName => $name], [Port => $port];
  +    },
  +    2 => sub {
  +        my($name, $port) = @_;
  +        [ServerName => "$name:$port"];
  +    },
  +);
  +
   sub parse_vhost {
       my($self, $line) = @_;
   
  @@ -753,7 +766,8 @@
       my $port = $self->new_vhost($module);
   
       #extra config that should go *inside* the <VirtualHost ...>
  -    my @in_config = ();
  +    my $in_cfg = $self->server->version_of(\%servername_config);
  +    my @in_config = $in_cfg->($self->{vars}->{servername}, $port);
   
       #extra config that should go *outside* the <VirtualHost ...>
       my @out_config = ([Listen => $port]);
  
  
  

Mime
View raw message