You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1998/09/19 19:38:16 UTC

cvs commit: modperl/lib/Apache PerlRun.pm Registry.pm

dougm       98/09/19 10:38:16

  Modified:    .        Changes ToDo
               lib/Apache PerlRun.pm Registry.pm
  Log:
  fix bug in Apache::Registry if $r->uri eq "/", thanks to Mike Wertheim
  for the spot
  
  Revision  Changes    Path
  1.148     +4 -1      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- Changes	1998/09/19 17:28:08	1.147
  +++ Changes	1998/09/19 17:38:14	1.148
  @@ -8,7 +8,10 @@
   
   =item 1.15_01-dev
   
  -Added Doug Bagley's Apache::SizeLimit [Brian Moseley, <ix...@maz.org>]
  +fix bug in Apache::Registry if $r->uri eq "/", thanks to Mike Wertheim
  +for the spot
  +
  +Added Doug Bagley's Apache::SizeLimit [Brian Moseley <ix...@maz.org>]
   
   a Perl syntax error may corrupt the Perl stack, rendering the
   process useless, so we now child_terminate() if this is the case  
  
  
  
  1.90      +2 -2      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- ToDo	1998/09/19 16:43:35	1.89
  +++ ToDo	1998/09/19 17:38:14	1.90
  @@ -3,9 +3,9 @@
                    (well, close to it anyhow)
   ---------------------------------------------------------------------------
   
  -- $ENV{PATH}
  +- cache method for Apache::PerlRun
   
  -- Apache::SizeLimit (Brian Moseley)
  +- $ENV{PATH}
   
   - 'make htmldoc' (Brian Moseley)
   
  
  
  
  1.7       +5 -3      modperl/lib/Apache/PerlRun.pm
  
  Index: PerlRun.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/lib/Apache/PerlRun.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PerlRun.pm	1998/09/17 17:09:42	1.6
  +++ PerlRun.pm	1998/09/19 17:38:15	1.7
  @@ -66,12 +66,14 @@
   sub namespace {
       my($r, $root) = @_;
   
  +    my $uri = $r->uri; 
  +    $uri = "/__INDEX__" if $uri eq "/";
       $r->log_error(sprintf "Apache::PerlRun->namespace escaping %s",
  -		  $r->uri) if $Debug && $Debug & 4;
  +		  $uri) if $Debug && $Debug & 4;
   
       my $script_name = $r->path_info ?
  -	substr($r->uri, 0, length($r->uri)-length($r->path_info)) :
  -	    $r->uri;
  +	substr($uri, 0, length($uri)-length($r->path_info)) :
  +	    $uri;
   
       if($Apache::Registry::NameWithVirtualHost) {
   	my $srv = $r->server;
  
  
  
  1.18      +7 -5      modperl/lib/Apache/Registry.pm
  
  Index: Registry.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/lib/Apache/Registry.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Registry.pm	1998/08/31 22:31:12	1.17
  +++ Registry.pm	1998/09/19 17:38:15	1.18
  @@ -54,12 +54,14 @@
   
   	my $mtime = -M _;
   
  +	my $uri = $r->uri;
  +	$uri = "/__INDEX__" if $uri eq "/";
   	# turn into a package name
   	$r->log_error(sprintf "Apache::Registry::handler examining %s",
  -		      $r->uri) if $Debug && $Debug & 4;
  +		      $uri) if $Debug && $Debug & 4;
   	my $script_name = $r->path_info ?
  -	    substr($r->uri, 0, length($r->uri)-length($r->path_info)) :
  -		$r->uri;
  +	    substr($uri, 0, length($uri)-length($r->path_info)) :
  +		$uri;
   
   	if($Apache::Registry::NameWithVirtualHost) {
   	    my $name = $r->get_server_name;
  @@ -121,7 +123,7 @@
   	    $r->stash_rgy_endav($script_name);
   	    if ($@) {
   		$r->log_error($@);
  -		$@{$r->uri} = $@;
  +		$@{$uri} = $@;
   		return SERVER_ERROR unless $Debug && $Debug & 2;
   		return Apache::Debug::dump($r, SERVER_ERROR);
   	    }
  @@ -139,7 +141,7 @@
   	if($@) {
   	    $errsv = $@;
   	    $@ = ''; #XXX fix me, if we don't do this Apache::exit() breaks
  -	    $@{$r->uri} = $errsv;
  +	    $@{$uri} = $errsv;
   	}
   
   	if($errsv) {