summaryrefslogtreecommitdiff
path: root/src/mod_webdav.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2006-09-01 10:21:53 +0000
committerJan Kneschke <jan@kneschke.de>2006-09-01 10:21:53 +0000
commit38b24d85d40eb98dcadb38de1965f234e1b9fabc (patch)
tree0f5732c4acf7094844398cd7cfa17aa42dbeb65c /src/mod_webdav.c
parent33983f89f1d08a49609f2f423eb285cff16da7b0 (diff)
downloadlighttpd-git-38b24d85d40eb98dcadb38de1965f234e1b9fabc.tar.gz
backported to the 1.4.11 interface
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1277 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_webdav.c')
-rw-r--r--src/mod_webdav.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/mod_webdav.c b/src/mod_webdav.c
index 4ccc75af..2e67c96b 100644
--- a/src/mod_webdav.c
+++ b/src/mod_webdav.c
@@ -8,6 +8,9 @@
#include <stdio.h>
#include <assert.h>
+#include <unistd.h>
+#include <dirent.h>
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -35,9 +38,7 @@
#include "stream.h"
#include "stat_cache.h"
-#include "sys-files.h"
#include "sys-mmap.h"
-#include "sys-strings.h"
/**
* this is a webdav for a lighttpd plugin
@@ -371,6 +372,8 @@ SETDEFAULTS_FUNC(mod_webdav_set_defaults) {
return HANDLER_GO_ON;
}
+#define PATCH_OPTION(x) \
+ p->conf.x = s->x;
static int mod_webdav_patch_connection(server *srv, connection *con, plugin_data *p) {
size_t i, j;
plugin_config *s = p->config_storage[0];
@@ -592,11 +595,11 @@ static int webdav_delete_dir(server *srv, connection *con, plugin_data *p, physi
}
buffer_copy_string_buffer(d.path, dst->path);
- PATHNAME_APPEND_SLASH(d.path);
+ BUFFER_APPEND_SLASH(d.path);
buffer_append_string(d.path, de->d_name);
buffer_copy_string_buffer(d.rel_path, dst->rel_path);
- PATHNAME_APPEND_SLASH(d.rel_path);
+ BUFFER_APPEND_SLASH(d.rel_path);
buffer_append_string(d.rel_path, de->d_name);
/* stat and unlink afterwards */
@@ -751,19 +754,19 @@ static int webdav_copy_dir(server *srv, connection *con, plugin_data *p, physica
}
buffer_copy_string_buffer(s.path, src->path);
- PATHNAME_APPEND_SLASH(s.path);
+ BUFFER_APPEND_SLASH(s.path);
buffer_append_string(s.path, de->d_name);
buffer_copy_string_buffer(d.path, dst->path);
- PATHNAME_APPEND_SLASH(d.path);
+ BUFFER_APPEND_SLASH(d.path);
buffer_append_string(d.path, de->d_name);
buffer_copy_string_buffer(s.rel_path, src->rel_path);
- PATHNAME_APPEND_SLASH(s.rel_path);
+ BUFFER_APPEND_SLASH(s.rel_path);
buffer_append_string(s.rel_path, de->d_name);
buffer_copy_string_buffer(d.rel_path, dst->rel_path);
- PATHNAME_APPEND_SLASH(d.rel_path);
+ BUFFER_APPEND_SLASH(d.rel_path);
buffer_append_string(d.rel_path, de->d_name);
if (-1 == stat(s.path->ptr, &st)) {
@@ -1394,10 +1397,10 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
}
buffer_copy_string_buffer(d.path, dst->path);
- PATHNAME_APPEND_SLASH(d.path);
+ BUFFER_APPEND_SLASH(d.path);
buffer_copy_string_buffer(d.rel_path, dst->rel_path);
- PATHNAME_APPEND_SLASH(d.rel_path);
+ BUFFER_APPEND_SLASH(d.rel_path);
if (de->d_name[0] == '.' && de->d_name[1] == '\0') {
/* don't append the . */
@@ -1852,7 +1855,7 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) {
}
buffer_copy_string_buffer(p->physical.path, p->physical.doc_root);
- PATHNAME_APPEND_SLASH(p->physical.path);
+ BUFFER_APPEND_SLASH(p->physical.path);
buffer_copy_string_buffer(p->physical.basedir, p->physical.path);
/* don't add a second / */