Bug #1619
closedWebDAV: can't lock (HTTP/1.1 409 Conflict)
Description
I'm using lighttpd on Debian etch.
Here the Request an response of lighttpd:
<<< LOCK /test.htm HTTP/1.1 <<< Host: 10.0.0.11 <<< User-Agent: BitKinex/2.9.3 <<< Accept: */* <<< Pragma: no-cache <<< Cache-Control: no-cache <<< Timeout: infinity <<< Translate: f <<< Content-Length: 232 <<< Content-Type: text/xml >>> HTTP/1.1 409 Conflict >>> Content-Type: text/html >>> Content-Length: 343 >>> Date: Tue, 01 Apr 2008 12:47:12 GMT >>> Server: lighttpd/1.4.13
I have seen the following in the source mod_webdav.c:
URIHANDLER_FUNC(mod_webdav_subrequest_handler) { plugin_data *p = p_d; buffer *b; DIR *dir; data_string *ds; int depth = -1; -> depth is here -1 /* PROPFIND need them */ if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Depth"))) { depth = strtol(ds->value->ptr, NULL, 10); } -> We have no "Depth" Heder so depth is still -1 case HTTP_METHOD_LOCK: if (depth != 0 && depth != -1) { con->http_status = 400; return HANDLER_FINISHED; } #ifdef USE_LOCKS if (con->request.content_length) { xmlDocPtr xml; buffer *hdr_if = NULL; -> hdr_if is here NULL if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "If"))) { hdr_if = ds->value; } -> we have no "If" Header so hdr_if is here still NULL /* we don't support Depth: Infinity on locks */ if (hdr_if == NULL && depth == -1) { -> And here I get the 409 Error con->http_status = 409; /* Conflict */ return HANDLER_FINISHED; }
I don't know if this is a bug.
Can You please check it.
Thanx.
Markus.
-- wawersich
Updated by stbuehler about 17 years ago
http://www.webdav.org/specs/rfc2518.html#rfc.section.8.10.4:
If no Depth header is submitted on a LOCK request then the request MUST act as if a "Depth:infinity" had been submitted.
And the source code says:
/* we don't support Depth: Infinity on locks */
Updated by stbuehler almost 17 years ago
- Status changed from New to Fixed
- Resolution set to wontfix
I don't think infinity depth locks will be implemented, so i'll close this with won't fix.
Updated by gstrauss almost 9 years ago
- Description updated (diff)
partial fix submitted in https://github.com/lighttpd/lighttpd1.4/pull/34 "[mod_webdav] allow Depth: Infinity lock on file"
lighttpd still does not support Depth: infinity on directories
Updated by gstrauss over 1 year ago
- Status changed from Wontfix to Fixed
- Target version deleted (
1.4.20) - ASK QUESTIONS IN Forums set to No
webdav.opts
"propfind-depth-infinity"
option added in lighttpd 1.4.56 to allow and support Depth: infinity
on directories.
Also available in: Atom