Project

General

Profile

Actions

Bug #1619

closed

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

Added by Anonymous about 16 years ago. Updated 4 months ago.

Status:
Fixed
Priority:
Normal
Category:
mod_webdav
Target version:
-
ASK QUESTIONS IN Forums:
No

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

Actions #1

Updated by stbuehler about 16 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 */

Actions #2

Updated by stbuehler almost 16 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.

Actions #3

Updated by stbuehler over 15 years ago

  • Status changed from Fixed to Wontfix
Actions #4

Updated by gstrauss about 8 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

Actions #5

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

Actions

Also available in: Atom