You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/04/07 18:55:15 UTC

Requests to server-status result in two calls to stat().

In httpd.conf I have enabled mod_status thusly...
<Location /server-status>
SetHandler server-status
</Location>

A request for http://mymachine/server-status will result in two stats:

stat 1 - %DocumentRoot%/server-status
stat 2 - %DocumentRoot%

Both are in get_path_info() as part of directory_walk(). 

What is the preferred way to configure Apache to avoid these two stats?

Bill


Re: Requests to server-status result in two calls to stat().

Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
I'm working this weekend on nothing but finishing the win32 apr_filepath_
calls and renaming the apr_optional symbols to fit how DougM has restructured
the rest of APR.  Once that change is in, we will kill canoncical conversions
in AP_ and move the last bits to APR_, bypassing stats entirely if you set
AllowOverrides None.  When you do need a stat, it won't stat anything up the
chain of DocumentRoot, but take DocumentRoot as gospel (if that change hadn't 
happened already.)

My final theory on this... if the <Directory /foo/bar> is specified (or has
been cached) and already canoncialized to /foo/bar (it's the exact name) and
the user requests /foo/bar, then no stats.  If the user types /Foo/Bar, then
we have stats, and then we introduce the choice of serving as /Foo/Bar, or
redirecting to /foo/bar. 

The only performance seriously hurt will be the users who insist on creating
the /foo/bar path and then leave all their <IMG SRC> or <A HREF> tags pointing
at /Foo/Bar, and that can be documented.

Bill

----- Original Message ----- 
From: "Bill Stoddard" <bi...@wstoddard.com>
To: <ne...@apache.org>
Sent: Saturday, April 07, 2001 11:55 AM
Subject: Requests to server-status result in two calls to stat().


> In httpd.conf I have enabled mod_status thusly...
> <Location /server-status>
> SetHandler server-status
> </Location>
> 
> A request for http://mymachine/server-status will result in two stats:
> 
> stat 1 - %DocumentRoot%/server-status
> stat 2 - %DocumentRoot%
> 
> Both are in get_path_info() as part of directory_walk(). 
> 
> What is the preferred way to configure Apache to avoid these two stats?
> 
> Bill
> 
>