Bug #1619
WebDAV: can't lock (HTTP/1.1 409 Conflict)
| Status: | Wontfix | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | mod_webdav | |||
| Target version: | 1.4.20 | |||
| Pending: | No |
Resolution: | wontfix |
|
| Patch available: |
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
History
04/01/2008 03:36 PM - stbuehler
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 */
05/21/2008 03:22 PM - stbuehler
- 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.