Lines Matching defs:resource

810                 ** The resource will have one or more lock tokens. We only
818 ** to match only one. The resource's other
839 const dav_resource *resource,
860 /* DBG1("validate: <%s>", resource->uri); */
863 ** The resource will have one of three states:
880 ** of this resource's locktokens in the If: header.
905 if ((err = dav_lock_query(lockdb, resource, &lock_list)) != NULL) {
925 "Existing lock(s) on the requested resource "
931 ** any requirement to find the resource's locks in an If: header.
943 "The requested resource is already "
949 ** The locks on the resource (if any) are all shared. Set the
959 ** If we have no locks or if the resource is not being modified
963 ** of the resource's locks in the If: header.
985 "This resource is locked and an \"If:\" header "
987 "resource.");
993 ** we are required to find that token in this resource's set of locks.
999 ** Don't issue this response if we're talking about the parent resource.
1000 ** It is okay for that resource to NOT have this locktoken.
1010 "header is invalid because this resource has no "
1023 ** URIs, but the majority of URIs provided to us via a resource walk
1026 uri = resource->uri;
1035 /* get the resource's etag; we may need it during the checks */
1036 etag = (*resource->hooks->getetag)(resource);
1041 /* If there are if-headers, fail if this resource
1054 ** A tagged-list's URI doesn't match this resource's URI.
1060 /* this state_list applies to this resource */
1071 /* To succeed, resource must match *all* of the states
1107 ** entity-tag on the resource. This state_list is
1111 "an entity-tag was specified, but the resource's "
1119 ** entity-tag on the resource. This state_list is
1124 "but the resource's actual ETag matches the provided "
1176 ** We have now matched up one of the resource's locktokens
1179 ** requirement of seeing at least one of the resource's
1187 ** is NOT present on the resource. But we just found
1194 "in the locks on this resource";
1202 ** to manipulate a resource.
1219 ** resource's locktokens.
1234 ** resource. We didn't, so this state_list must fail.
1238 "in the locks on this resource.";
1264 ** The next requirement is that we have seen one of the resource's
1281 ** going to match this resource. We bust out and try the next
1301 ** If none of the state_lists apply to this resource, then we
1304 ** was a no-tag-list, then it would have applied to this resource.
1309 ** If we saw one of the resource's locktokens, then we're done.
1335 "This resource is locked and the \"If:\" "
1337 "locktokens for this resource's lock(s).");
1351 "of this resource's locktoken(s).");
1357 "header did not match this resource.");
1364 "this resource. At least one "
1374 ** one the resource's locktokens in the If: header.
1377 ** resource's locktokens. Note that we need to go back and scan them
1394 ** of this resource's locktokens. Tell them so.
1399 ** specify one of this resource's locktokens. (this implies something
1408 "of this resource's locktoken(s).");
1412 "This resource is locked and the \"If:\" header "
1414 "locktokens for this resource's lock(s).");
1417 /* dav_validate_walker: Walker callback function to validate resource state */
1423 if ((err = dav_validate_resource_state(ctx->w.pool, wres->resource,
1436 || (*wres->resource->hooks->is_same_resource)(wres->resource,
1455 * If-Match '*' request should succeed only if the resource exists. */
1464 * if the resource does not exist. */
1487 ** the parent collection will accept a new member (ie current resource
1495 dav_resource *resource,
1507 const dav_hooks_repository *repos_hooks = resource->hooks;
1532 etag = (*resource->hooks->getetag)(resource);
1540 resource_state = dav_get_resource_state(r, resource);
1570 ifhdr_new->uri = resource->uri;
1571 ifhdr_new->uri_len = strlen(resource->uri);
1598 /* (1) Validate the specified resource, at the specified depth */
1599 if (resource->exists && depth > 0) {
1607 ctx.w.root = resource;
1625 err = dav_validate_resource_state(r->pool, resource, lockdb,
1629 /* (2) Validate the parent resource if requested */
1633 err = (*repos_hooks->get_parent_resource)(resource, &parent_resource);
1646 ** This error occurred on the parent resource. This implies that
1657 "A validation error has occurred on the parent resource, "
1658 "preventing the operation on the resource specified by "
1693 "An error occurred on another resource, "
1695 "this resource.");
1716 new_response->href = resource->uri;
1720 "An error occurred on another resource, preventing the "
1721 "requested operation on this resource.";
1813 const dav_resource *resource)
1841 * Determine whether auto-checkout is enabled for a resource.
1843 * resource - the resource
1844 * auto_version - the value of the auto_versionable hook for the resource
1850 dav_resource *resource,
1881 if ((err = dav_lock_query(*lockdb, resource, &lock_list)) != NULL) {
1899 dav_resource *resource,
1914 /* check parent resource if requested or if resource must be created */
1915 if (!resource->exists || parent_only) {
1918 if ((err = (*resource->hooks->get_parent_resource)(resource,
1926 "collections. Cannot create resource %s.",
1927 ap_escape_html(r->pool, resource->uri)));
1952 * so no separate working resource will be created.
1961 "Cannot create resource %s.",
1962 ap_escape_html(r->pool, resource->uri)),
1976 /* if creating a new resource, see if it should be version-controlled */
1977 if (!resource->exists
1978 && (*vsn_hooks->auto_versionable)(resource) == DAV_AUTO_VERSION_ALWAYS) {
1980 if ((err = (*vsn_hooks->vsn_control)(resource, NULL)) != NULL) {
1983 "Unable to create versioned resource %s.",
1984 ap_escape_html(r->pool, resource->uri)),
1989 /* remember that resource was created */
1993 /* if resource is versioned, make sure it is checked out */
1994 if (resource->versioned && !resource->working) {
1997 if ((err = dav_can_auto_checkout(r, resource,
1998 (*vsn_hooks->auto_versionable)(resource),
2010 * no separate working resource will be created. */
2011 if ((err = (*vsn_hooks->checkout)(resource, 1 /*auto_checkout*/,
2017 "Unable to checkout resource %s.",
2018 ap_escape_html(r->pool, resource->uri)),
2023 /* remember that resource was checked out */
2035 dav_auto_checkin(r, resource, 1 /*undo*/, 0 /*unlock*/, av_info);
2045 dav_resource *resource,
2060 if (resource != NULL) {
2062 if ((err = (*vsn_hooks->uncheckout)(resource)) != NULL) {
2066 "of resource %s.",
2067 ap_escape_html(r->pool, resource->uri)),
2076 if ((err = (*resource->hooks->remove_resource)(resource,
2081 "of resource %s.",
2082 ap_escape_html(r->pool, resource->uri)),
2102 /* If the resource was checked out, and auto-checkin is enabled,
2105 if (resource != NULL && resource->working
2108 auto_version = (*vsn_hooks->auto_versionable)(resource);
2113 if ((err = (*vsn_hooks->checkin)(resource,
2118 "Unable to auto-checkin resource %s.",
2119 ap_escape_html(r->pool, resource->uri)),
2125 /* If parent resource was checked out, and auto-checkin is enabled,