Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mod_dav_fs to tolerate race conditions in PROPFIND #369

Closed
wants to merge 1 commit into from

Conversation

notroj
Copy link
Collaborator

@notroj notroj commented Jul 5, 2023

Allow mod_dav_fs to tolerate race conditions between PROPFIND and an
operation which removes a directory/directory between apr_dir_read() and apr_stat(). Current behaviour is to abort the connection which seems inferior to tolerating (and logging) the error.

* modules/dav/fs/repos.c (dav_fs_walker): If DAV_WALKTYPE_TOLERANT is set, ignore ENOENT from stat() rather than aborting the response. Log the error from stat either way.

* modules/dav/main/mod_dav.c (dav_method_propfind): Set DAV_WALKTYPE_TOLERANT.

* modules/dav/main/mod_dav.h: Add DAV_WALKTYPE_TOLERANT.

@notroj notroj force-pushed the dav-propfind-races branch 2 times, most recently from 6e83f3a to 02b2c80 Compare July 5, 2023 13:56
operation which removes a directory/file between apr_dir_read() and
apr_stat(). Current behaviour is to abort the connection which seems
inferior to tolerating (and logging) the error.

* modules/dav/fs/repos.c (dav_fs_walker): If DAV_WALKTYPE_TOLERANT is
  set, ignore ENOENT from stat() rather than aborting the response.
  Log the error from stat either way.

* modules/dav/main/mod_dav.c (dav_method_propfind): Set
  DAV_WALKTYPE_TOLERANT.

* modules/dav/main/mod_dav.h: Add DAV_WALKTYPE_TOLERANT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant