Bug #1826

mod_webdav readdir POSIX compatibility issue

Added by Joakim over 10 years ago. Updated almost 3 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Missing in 1.5.x:


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

Associated revisions

Revision f4cb07f7 (diff)
Added by gstrauss almost 3 years ago

[mod_webdav] readdir POSIX compat (fixes #1826)

do not expect '.' to be part of dir listing

"mod_webdav readdir POSIX compatibility issue"



Updated by gstrauss almost 3 years ago

  • Status changed from New to Patch Pending

At first glance, patch looks reasonable, though deleted lines in patch should just be deleted instead of being replaced with blank lines


Updated by gstrauss almost 3 years ago

edited patch as I had suggested above


Updated by gstrauss almost 3 years ago

  • Status changed from Patch Pending to Fixed

committed in f4cb07f7

Also available in: Atom