Project

General

Profile

lighttpd-git-infinite-locks-regular-files.patch

Allow locks of infinite depth on anything else than directories - mstorsjo, 2009-04-03 12:41

View differences:

src/mod_webdav.c
2222 2222
				hdr_if = ds->value;
2223 2223
			}
2224 2224

  
2225
			/* we don't support Depth: Infinity on locks */
2225
			/* we don't support Depth: Infinity on directories */
2226 2226
			if (hdr_if == NULL && depth == -1) {
2227
				con->http_status = 409; /* Conflict */
2227
				if (0 == stat(con->physical.path->ptr, &st) && S_ISDIR(st.st_mode)) {
2228
					con->http_status = 409; /* Conflict */
2228 2229

  
2229
				return HANDLER_FINISHED;
2230
					return HANDLER_FINISHED;
2231
				}
2230 2232
			}
2231 2233

  
2232 2234
			if (1 == webdav_parse_chunkqueue(srv, con, p, con->request_content_queue, &xml)) {