On Sun, 12 Dec 1999, Bill Moseley wrote:

> I'm wondering why $r->handler returns undef for perl-script handlers.
> 
> I'd like to be able to tally the number of requests by type: perl-script,
> cgi-script, and other (.html, image) requests.  $r->handler returns
> cgi-script as expected, but returns undef for perl-script.

I just dropped this into t/conf/httpd.conf:
PerlLogHandler 'sub { \
   my $r = shift; \
   printf STDERR "handler=%s, uri=%s\n", \
   $r->handler || $r->content_type, $r->uri; \
}'

and ran 'make test', I see the expected results:
handler=text/html, uri=/test.html
handler=text/html, uri=/test.html
handler=text/perl-module, uri=/LoadClass.pm
handler=perl-script, uri=/perl/cgi.pl
handler=perl-script, uri=/perl/cgi.pl
handler=perl-script, uri=/perl/cgi.pl
handler=cgi-script, uri=/cgi-bin/cgi.pl
handler=perl-script, uri=/perl/file_upload.cgi
handler=perl-script, uri=/perl/constants.pl
handler=perl-script, uri=/perl/file.pl
handler=perl-script, uri=/perl/io/include.pl
handler=perl-script, uri=/perl/log.pl
handler=perl-script, uri=/dirty-perl/dirty-test.cgi
handler=perl-script, uri=/subr/index.html
handler=text/html, uri=/rgy-include.shtml
handler=text/html, uri=/content.shtml
handler=text/html, uri=/STAGE/u1/nochance.html
handler=perl-script, uri=/perl/perl-status
...

Reply via email to