Thanks, this works fine and is just what we required.

Martin

On Thu, Sep 28, 2000 at 09:33:38AM -0700, Doug MacEachern wrote:
> On Fri, 22 Sep 2000, Martin Wood wrote:
> 
> > We have a collection of CGIs in a single directory handled by Apache::Registry, 
>however if we enter the name of a resource under that location that doesn't exist, 
>say www.noddy.com/registry_dir/dont_exist.cgi this is not recorded in the error_log, 
>just the access log, yet the correct 404 "File not found" response is displayed to 
>the client. 
> > 
> > For locations managed by default handlers, attempts to access non-existent files 
>is logged in both the access and error logs. Is is possible to activate this 
>behaviour for the Apache::Registry handled location?
> 
> i guess that's because Apache::Registry doesn't log an error,
> whoopsie.  this patch fixes that.
> 
> Index: lib/Apache//PerlRun.pm
> ===================================================================
> RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v
> retrieving revision 1.29
> diff -u -r1.29 PerlRun.pm
> --- lib/Apache//PerlRun.pm    2000/06/01 21:07:56     1.29
> +++ lib/Apache//PerlRun.pm    2000/09/28 16:31:12
> @@ -60,6 +60,7 @@
>       $pr->{'mtime'} = -M _;
>       return wantarray ? (OK, $pr->{'mtime'}) : OK;
>      }
> +    $pr->log_error("$filename not found or unable to stat");
>      return NOT_FOUND;
>  }
>  
> Index: lib/Apache//Registry.pm
> ===================================================================
> RCS file: /home/cvs/modperl/lib/Apache/Registry.pm,v
> retrieving revision 1.32
> diff -u -r1.32 Registry.pm
> --- lib/Apache//Registry.pm   2000/08/02 15:53:15     1.32
> +++ lib/Apache//Registry.pm   2000/09/28 16:31:15
> @@ -165,6 +165,7 @@
>  #    }
>       return $r->status($old_status);
>      } else {
> +        $r->log_error("$filename not found or unable to stat");
>       return NOT_FOUND unless $Debug && $Debug & 2;
>       return Apache::Debug::dump($r, NOT_FOUND);
>      }

Reply via email to