httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Edwards <>
Subject Re: cvs commit: apache-1.3 STATUS
Date Thu, 08 Jun 2000 21:39:40 GMT
I think there are two issues here:
1) Win32-only problem with MAX_PATH wierdness
2) General issue of stat return value handling

Marc Slemko wrote:
> No, the whole point is that when something is doing a stat() to see if a
> file exists or not, the _ONLY_ things that should be treated as "this
> doesn't exist" are a limited set of known returns.  stat() can fail for
> two zillion reasons, and most of them should not result in the request
> going on as if the file doesn't exist.  This is the way things work on

Thanks for clarifying the importance of accurately the detecting the 
"this does not exist" case. Unfortunately, for strlen=MAX_PATH, 
Windows does not fail with an oddball value, it returns a value that
indicates "this does not exist" and that is what got us into trouble. 

So for item 1) then, the answer is to catch the MAX_PATH case and
return a value that does NOT indicate "this doesn't exist". Easy to do 
in 2.0 where we can test for MAX_PATH in ap_stat. Harder in 1.3, maybe
we need to add an ap_stat function so we can handle it the same way.

> There are also other areas, such as in mod_negotiation, that have a
> similar problem, only there it is not checking the return from a
> subrequest properly; same idea, not every failure is a "doesn't exist".
> This is a different issue that needs to be fixed too, since it results in
> the same problem on Unix with the default MultiViews setup (which I don't
> think is a good default anyway, but... that is another issue).

This is item 2), agreed, an across the board review of return value
is goodness, especially in light of these areas in which there are known 
to be weaknesses.

Thanks, Allan

View raw message