mod_webdav readdir POSIX compatibility issue
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."
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."
To remain compatible it would be nice to have this assumption removed
Also available in: Atom