nginx-0.7.9
Igor Sysoev
is at rambler-co.ru
Sat Aug 16 23:00:07 MSD 2008
On Tue, Aug 12, 2008 at 03:35:40PM -0700, mike wrote:
> The user has control over how many index files they define, so they
> can control their own performance, or order the index files in the
> manner in which is quickest for them. It's just simple file testing,
> as opposed to opening up the directory before going forward with the
> rest of the index file checking. That is actually a negative
> performance hit, not a positive one.
>
> Today:
>
> my config might be "index index.html index.php index.htm"
>
> 1) check index.html - not found
> 2) check directory
> 3) check index.php - not found
> 4) check index.htm - found
> 5) if it wasn't found, then do directory listing, or throw access
> denied 403 or whatever if not
>
> Maxim's patch:
>
> 1) check index.html - not found
> 2) check index.php - not found
> 3) check index.htm - found
> 4) if it wasn't found, then do directory listing, or throw access
> denied 403 or whatever if not
>
> Why bother with a directory check? It's an extra step in the middle of
> cycling through -predefined- index filenames.
If no one index file is found than directory test must be done anyway:
*) if directory exists, but no index files exist, then nginx should
pass control to next module (autoindex) and may eventually return 403.
*) if directory does not exist, then nginx should return 404.
There no way in Unix to know in single syscall if intermidiate directories
exist when file not found. Win32 returns ERROR_PATH_NOT_FOUND in this case
instead of ERROR_FILE_NOT_FOUND.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list