[mod_webdav] allow Depth: Infinity lock on file (fixes #2296)

(still not supporting Depth: Infinity on directories)

patch by mstorsjo submitted as part of feature request #1953

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3133 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Glenn Strauss 2016-04-01 16:26:25 +00:00 committed by Stefan Bühler
parent dd33a350bb
commit ab829cee5e
2 changed files with 6 additions and 3 deletions

1
NEWS
View File

@ -56,6 +56,7 @@ NEWS
* [core] fixed the loading for default modules if they are specified explicitly
* [core] lighttpd -tt performs preflight startup checks (fixes #411)
* [stat] mimetype.xattr-name global config option (fixes #2631)
* [mod_webdav] allow Depth: Infinity lock on file (fixes #2296)
- 1.4.39 - 2016-01-02
* [core] fix memset_s call (fixes #2698)

View File

@ -2218,11 +2218,13 @@ propmatch_cleanup:
hdr_if = ds->value;
}
/* we don't support Depth: Infinity on locks */
/* we don't support Depth: Infinity on directories */
if (hdr_if == NULL && depth == -1) {
con->http_status = 409; /* Conflict */
if (0 == stat(con->physical.path->ptr, &st) && S_ISDIR(st.st_mode)) {
con->http_status = 409; /* Conflict */
return HANDLER_FINISHED;
return HANDLER_FINISHED;
}
}
if (1 == webdav_parse_chunkqueue(srv, con, p, con->request_content_queue, &xml)) {