diff options
author | Jan Kneschke <jan@kneschke.de> | 2006-01-03 23:48:17 +0000 |
---|---|---|
committer | Jan Kneschke <jan@kneschke.de> | 2006-01-03 23:48:17 +0000 |
commit | cd4fd6f4d330d45b1c2d8b5038ba1f79bd3270c1 (patch) | |
tree | e8c8a31b441f579dfbd15d1833e2191cc19524b5 /src/mod_webdav.c | |
parent | ab8493f603d121fc62fc280a5216e566e82345a8 (diff) | |
download | lighttpd-git-cd4fd6f4d330d45b1c2d8b5038ba1f79bd3270c1.tar.gz |
Depth: 1 PROPFIND request have to include the requested collection too
- this fixes an error with kde ioslave for webdav seen in krusader
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@913 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_webdav.c')
-rw-r--r-- | src/mod_webdav.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mod_webdav.c b/src/mod_webdav.c index a40477c2..e37faa16 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -1176,19 +1176,23 @@ URIHANDLER_FUNC(mod_webdav_subrequest_handler) { d.rel_path = buffer_init(); while(NULL != (de = readdir(dir))) { - if ((de->d_name[0] == '.' && de->d_name[1] == '\0') || - (de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0')) { + if (de->d_name[0] == '.' && de->d_name[1] == '.' && de->d_name[2] == '\0') { continue; /* ignore the parent dir */ } buffer_copy_string_buffer(d.path, dst->path); BUFFER_APPEND_SLASH(d.path); - buffer_append_string(d.path, de->d_name); - + buffer_copy_string_buffer(d.rel_path, dst->rel_path); BUFFER_APPEND_SLASH(d.rel_path); - buffer_append_string(d.rel_path, de->d_name); + + if (de->d_name[0] == '.' && de->d_name[1] == '\0') { + /* don't append the . */ + } else { + buffer_append_string(d.path, de->d_name); + buffer_append_string(d.rel_path, de->d_name); + } buffer_reset(prop_200); buffer_reset(prop_404); |