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 1999/06/08 06:50:10 UTC

cvs commit: modperl/lib/Apache RegistryBB.pm

dougm       99/06/07 21:50:09

  Modified:    .        Changes
               lib/Apache RegistryBB.pm
  Log:
  fix Apache::RegistryBB when $r->filename NOT_FOUND
  
  Revision  Changes    Path
  1.304     +3 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.303
  retrieving revision 1.304
  diff -u -r1.303 -r1.304
  --- Changes	1999/06/07 01:52:51	1.303
  +++ Changes	1999/06/08 04:50:08	1.304
  @@ -8,6 +8,9 @@
   
   =item 1.19_01-dev
   
  +fix Apache::RegistryBB when $r->filename NOT_FOUND 
  +[Frank D. Cringle <fd...@cliwe.ping.de>]
  +
   cygwin port [Stipe Tolj <to...@uni-duesseldorf.de>]
   
   Documented $r->pnotes [<as...@valueclick.com>]
  
  
  
  1.2       +6 -2      modperl/lib/Apache/RegistryBB.pm
  
  Index: RegistryBB.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/lib/Apache/RegistryBB.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RegistryBB.pm	1998/09/22 15:33:40	1.1
  +++ RegistryBB.pm	1999/06/08 04:50:09	1.2
  @@ -2,7 +2,7 @@
   
   use strict;
   use vars qw(@ISA);
  -use Apache::Constants qw(FORBIDDEN OK);
  +use Apache::Constants qw(NOT_FOUND FORBIDDEN OK);
   use Apache::RegistryNG (); 
   @ISA = qw(Apache::RegistryNG);
   
  @@ -17,7 +17,11 @@
   #skip -x, OPT_EXEC, etc. checks
   sub can_compile {
       my $r = shift;
  -    if(-d $r->finfo) {
  +    unless (-r $r->finfo) {
  +	$r->log_reason("file does not exist");
  +	return NOT_FOUND;
  +    }
  +    if (-d _) {
   	$r->log_reason("attempt to invoke directory as script");
   	return FORBIDDEN;
       }