place to do a PUT(!))
*) util.c: add a comment. allow validation to proceed without a lock
database (the rest of the code supported it; one erroneous check disabled
that work)
*) util_lock.c: allow dav_unlock() to be a no-op when a lock provide isn't
present; this allows DELETE to work.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88508
13f79535-47bb-0310-9956-
ffa450edef68
return dav_handle_err(r, err, NULL);
/* If not a file or collection resource, PUT not allowed */
- if (resource->type != DAV_RESOURCE_TYPE_REGULAR) {
+ if (resource->type != DAV_RESOURCE_TYPE_REGULAR
+ && resource->type != DAV_RESOURCE_TYPE_WORKING) {
body = apr_psprintf(r->pool,
"Cannot create resource %s with PUT.",
ap_escape_html(r->pool, r->uri));
** We may have aborted the scan before seeing the locktoken.
** Rescan the If: header to see if we can find the locktoken
** somewhere.
+ **
+ ** Note that seen_locktoken == 0 implies lock_list != NULL
+ ** which implies locks_hooks != NULL.
*/
if (dav_find_submitted_locktoken(if_header, lock_list,
locks_hooks)) {
}
lock_db_opened_locally = 1;
}
- else {
- return dav_new_error(r->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
- "Resource validation failed because no "
- "lock hooks were found.");
- }
}
/* (1) Validate the specified resource, at the specified depth */
const dav_hooks_repository *repos_hooks = resource->hooks;
dav_error *err;
- /* If no locks provider, we shouldn't have been called */
+ /* If no locks provider, then there is nothing to unlock. */
if (hooks == NULL) {
- /* ### map result to something nice; log an error */
- return HTTP_INTERNAL_SERVER_ERROR;
+ return OK;
}
/* 2518 requires the entire lock to be removed if resource/locktoken