I was trying to track down the cause of PR#17357, and came across something interesting-slash-annoying.
mod_autoindex in Apache loops over the directory entries it's indexing using apr_dir_read(). Among other things, apr_dir_read() does an apr_lstat() call (which in turn calls apr_stat() with the APR_FINFO_LINK wanted flag) on the next entry in the directory. If you have a large file (>2GB) in the directory, though, on linux the lstat() will fail with errno==EOVERFLOW (75) (Value too large for defined data type). This causes the apr_lstat() to fail which causes the apr_dir_read() to fail which makes mod_autoindex think it's hit the end of the directory. Of course, if I go and explictly compile Apache with CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, then it works. So I guess the ultimate questions are these: (a) Why doesn't Apache automatically include largefile support? Performance reasons? Shouldn't there at least be an easy ./configure option to turn it on? (b) If it's not turned on, shouldn't mod_autoindex detect the EOVERFLOW return code and special-case it? --Cliff http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17357
