On Wed, 29 Oct 2008 16:13:32 -0400
Michael wrote:

> Ok then let's talk about "/foo/" and "/foo/index.pl" so that we're
> not talking about the redirect.


Right on

> if it was subrequests that were the problem I would have expected to
> see more than debug statement in the log since the cleanup handler
> was getting more than once, right?


Yes, absolutely. I think it will come down to how "/foo/index.pl" is
executed. If there is a response handler involved, it must explicitly
set $r->status, simply returning the status is not enough.


....FYI...

Below is an Apache log snippet which traces the handler phases for two
requests:

A) /scratch/ does NOT have a directory index
B) /scratch/foo/ DOES have a directory index (index.html)

Log format is:

[debug] [PID:milliseconds] $r->uri

(A)

[debug] [2828:0.0004] /scratch/
[debug] [2828:0.0004] /scratch/
[debug] [2828:0.0012] /scratch/
[debug] [2828:0.0035] /scratch/
[debug] [2828:0.0038] /scratch/
[debug] [2828:0.0042] /scratch/index.php
[debug] [2828:0.0042] /scratch/index.php
[debug] [2828:0.0050] /scratch/index.php
[debug] [2828:0.0051] /scratch/index.html
[debug] [2828:0.0051] /scratch/index.html
[debug] [2828:0.0052] /scratch/index.html
[debug] [2828:0.0053] /scratch/index.html.var
[debug] [2828:0.0053] /scratch/index.html.var
[debug] [2828:0.0054] /scratch/index.html.var
[debug] [2828:0.0055] /scratch/index.htm
[debug] [2828:0.0055] /scratch/index.htm
[debug] [2828:0.0056] /scratch/index.htm
[debug] [2828:0.0057] /scratch/index.html
[debug] [2828:0.0057] /scratch/index.html
[debug] [2828:0.0058] /scratch/index.html
[error] /var/www/vhosts/mybox.com/htdocs/scratch
[debug] [2828:0.0060] /scratch/
GET 403 /scratch/

(B)

[debug] [2832:0.0004] /scratch/hub/
[debug] [2832:0.0004] /scratch/hub/
[debug] [2832:0.0016] /scratch/hub/
[debug] [2832:0.0040] /scratch/hub/
[debug] [2832:0.0045] /scratch/hub/
[debug] [2832:0.0049] /scratch/hub/index.php
[debug] [2832:0.0049] /scratch/hub/index.php
[debug] [2832:0.0059] /scratch/hub/index.php
[debug] [2832:0.0060] /scratch/hub/index.html
[debug] [2832:0.0060] /scratch/hub/index.html
[debug] [2832:0.0071] /scratch/hub/index.html
[debug] [2832:0.0072] /scratch/hub/index.html
[debug] [2832:0.0084] /scratch/hub/index.html
[debug] [2832:0.0490] /scratch/hub/index.html
[debug] [2832:0.0490] /scratch/hub/index.html
GET 200 /scratch/hub/index.html