summaryrefslogtreecommitdiff
path: root/modules/dav
diff options
context:
space:
mode:
authorChristophe Jaillet <jailletc36@apache.org>2021-04-18 19:40:13 +0000
committerChristophe Jaillet <jailletc36@apache.org>2021-04-18 19:40:13 +0000
commit8433a9b8c9127929ec6e974a3dec7a8f95628032 (patch)
treef4539bc86ac7704a4cb5a4196c45652f3806657b /modules/dav
parentc0882d02091da592242b329d550604288c8caac5 (diff)
downloadhttpd-8433a9b8c9127929ec6e974a3dec7a8f95628032.tar.gz
Merge r1730128, r1878140, r1878265, r1881736, r1882775, r1883872, r1884509, r1887720 from trunk
*) Easy patches: synch 2.4.x and trunk - doxygen: Correct doxygen groupname - .gdbinit: align columns - .gdbinit: fix indentation - mod_dav: Add specific logs for different modes - core: ap_pbase64encode(): save double NUL byte allocation and assignment - core: ap_pbase64decode(): save double NUL byte allocation and assignment - support: Fix a typo in a comment - proxy_util.c: Fix leak in error path in the do_malloc case Submitted by: wrowe, ylavic, ylavic, jorton, rpluem, ylavic, jorton, jorton Reviewed by: jailletc36, gbechis, ylavic Backported by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1888929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav')
-rw-r--r--modules/dav/fs/repos.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c
index 8dfa28a34f..1f7379a4d3 100644
--- a/modules/dav/fs/repos.c
+++ b/modules/dav/fs/repos.c
@@ -948,15 +948,29 @@ static dav_error * dav_fs_open_stream(const dav_resource *resource,
else if (APR_STATUS_IS_EEXIST(rv)) {
rv = apr_file_open(&ds->f, ds->pathname, flags, APR_OS_DEFAULT,
ds->p);
+ if (rv != APR_SUCCESS) {
+ return dav_new_error(p, MAP_IO2HTTP(rv), 0, rv,
+ apr_psprintf(p, "Could not open an existing "
+ "resource for writing: %s.",
+ ds->pathname));
+ }
}
}
else {
rv = apr_file_open(&ds->f, ds->pathname, flags, APR_OS_DEFAULT, ds->p);
+ if (rv != APR_SUCCESS) {
+ return dav_new_error(p, MAP_IO2HTTP(rv), 0, rv,
+ apr_psprintf(p, "Could not open an existing "
+ "resource for reading: %s.",
+ ds->pathname));
+ }
}
if (rv != APR_SUCCESS) {
return dav_new_error(p, MAP_IO2HTTP(rv), 0, rv,
- "An error occurred while opening a resource.");
+ apr_psprintf(p, "An error occurred while opening "
+ "a resource for writing: %s.",
+ ds->pathname));
}
/* (APR registers cleanups for the fd with the pool) */