httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: AW: Filter function is called three times
Date Wed, 10 Oct 2007 13:38:09 GMT
Sven K├Ągi wrote:
> Hi again,
> Thanks for your hints.
>> If the request is for a directory, you may see three separate requests,
>> each one ending in the DirectoryIndex options (e.g. /dir/index.html
>> /dir/index.htm, /dir/index.cgi, etc).  These are typically subrequests
>> that a single request generates if the request doesn't match a file
>> directly.
> I tried that out by typing in <myurl>/filtered/index.html to match
> the file directly (besides this stuff is configured as <Location> and
> not as <Directory>) with the same results I had when I typed <myurl>/filtered/.
>> For fully understanding these, try logging the request URI.
> The request-URI is always /filtered/index.html.
> Interestingly its even the same if I type in an error.
> My logs then say that first my input filter is called exactly once.
> Then the content-handler is called saying "File does not exist" and then
> again my filter is called twice more as in the sample before.

Again, just log the r->uri to see what it is getting called on in your
input filter.  You may find an /error/404_NOT_FOUND.html reference,
which will actually be a sub request due to a missing document. 
Referencing the file directly should have shown us the file, however, if
we are missing an alias, or if we aren't mapping directly to a file that
apache knows of, we'll get the 404_NOT_FOUND errors.

>> It could also be related to a browsers ability to request just the
>> headers (via HEAD) or a full document (via GET) for caching.
> I think I should see that in the access file. Right?
> In the access file I only see one GET - request.

Absolutely.  It should show in the access log.

>> I'd suggest logging a few of the request_rec fields just to be sure.
> This I haven't tried until now. I'll try that out and see what I can figure out.
> Thanks for your help again.
> Sven

Joseph Lewis <>
"Divide the fire, and you will sooner put it out." - Publius Syrus

View raw message