Bug #1826
closedmod_webdav readdir POSIX compatibility issue
Description
We noticed during porting that mod _webdav gave an invalid response on PROPFIND request at depth one where the dav:response entry containing the properties for the target resource was missing.
Looking at the code, mod_webdav assumes that while iterating over the entries in the target collection using readdir(), there should be a dot entry to get properties for the target resource. If the usage of readdir should be POSIX compatible I belive this assumption is a bit to strict. According to IEEE Std 1003.1 2004.
"If entries for dot or dot-dot exist, one entry shall be returned for dot and one entry shall be returned for dot-dot; otherwise, they shall not be returned."
http://www.opengroup.org/onlinepubs/009695399/functions/readdir.html
This has also been noted for the GNU C library.
"Portability Note: On some systems readdir may not return entries for . and .., even though these are always valid file names in any directory. See File Name Resolution."
http://www.gnu.org/software/libc/manual/html_mono/libc.html#Reading_002fClosing-Directory
To remain compatible it would be nice to have this assumption removed
Files
Updated by gstrauss about 9 years ago
- File mod_webdav_POSIX_readdir-upd.patch mod_webdav_POSIX_readdir-upd.patch added
- Target version set to 1.4.40
Also available in: Atom