Re: Why double requests?
On Wed, 11 Oct 2000, Bill Moseley wrote: ... Here's the request: --- GET /test/abc/123 http/1.0 HTTP/1.1 200 OK Date: Wed, 11 Oct 2000 17:17:16 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 Connection: close Content-Type: text/plain hello Here's the error_log [Wed Oct 11 10:17:16 2000] [error] initial:/test/abc/123 [Wed Oct 11 10:17:16 2000] [error] not initial:/abc/123 [Wed Oct 11 10:17:16 2000] [error] [client 192.168.0.98] client denied by server configuration: /usr/local/apache/htdocs/abc Why the second request with the extra path? because in this case you have path_info data, when %ENV is populated, ap_add_cgi_vars() calls ap_sub_req_lookup_uri() to resolve PATH_TRANSLATED. notice you won't see it with: PerlSetupEnv Off
Why double requests?
mod_perl 1.24/1.3.12 perl 5.6 Here's my httpd.conf: - Listen 9000 VirtualHost *:9000 perl package My::DirectoryIndex; use Apache::Constants qw( DECLINED ); sub handler { my $r = shift; $r-log_error( ( $r-is_initial_req ? 'initial:' : 'not initial:' ) . $r-uri ); return DECLINED; } package My::Hello; use strict; use Apache::Constants qw( OK ); sub handler { my $r = shift; $r-send_http_header('text/plain'); $r-print('hello'); return OK; } /perl PerlTransHandler My::DirectoryIndex Location /test Allow from all SetHandler perl-script PerlHandler My::Hello PerlSendHeader on /Location /VirtualHost Here's the request: --- GET /test/abc/123 http/1.0 HTTP/1.1 200 OK Date: Wed, 11 Oct 2000 17:17:16 GMT Server: Apache/1.3.12 (Unix) mod_perl/1.24 Connection: close Content-Type: text/plain hello Here's the error_log [Wed Oct 11 10:17:16 2000] [error] initial:/test/abc/123 [Wed Oct 11 10:17:16 2000] [error] not initial:/abc/123 [Wed Oct 11 10:17:16 2000] [error] [client 192.168.0.98] client denied by server configuration: /usr/local/apache/htdocs/abc Why the second request with the extra path? This doesn't generate a second request: GET /hello/abc/123 http/1.0 HTTP/1.1 403 Forbidden [Wed Oct 11 10:25:22 2000] [error] initial:/hello/abc/123 [Wed Oct 11 10:25:22 2000] [error] [client 192.168.0.98] client denied by server configuration: /usr/local/apache/htdocs/hello Bill Moseley mailto:[EMAIL PROTECTED]