Project

General

Profile

Bug #1619

WebDAV: can't lock (HTTP/1.1 409 Conflict)

Added by Anonymous almost 12 years ago. Updated almost 4 years ago.

Status:
Wontfix
Priority:
Normal
Assignee:
-
Category:
mod_webdav
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

#1

Updated by stbuehler almost 12 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 */

#2

Updated by stbuehler over 11 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.

#3

Updated by stbuehler over 11 years ago

  • Status changed from Fixed to Wontfix
#4

Updated by gstrauss almost 4 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

Also available in: Atom