#endif
}
-int dav_fs_find_liveprop(request_rec *r, const char *ns_uri, const char *name,
+int dav_fs_find_liveprop(const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks)
{
+ /* don't try to find any liveprops if this isn't "our" resource */
+ if (resource->hooks != &dav_hooks_repository_fs)
+ return 0;
return dav_do_find_liveprop(ns_uri, name, &dav_fs_liveprop_group, hooks);
}
void dav_fs_insert_all_liveprops(request_rec *r, const dav_resource *resource,
int insvalue, ap_text_header *phdr)
{
+ /* don't insert any liveprops if this isn't "our" resource */
+ if (resource->hooks != &dav_hooks_repository_fs)
+ return;
+
if (!resource->exists) {
/* a lock-null resource */
/*
const dav_hooks_propdb *dav_fs_get_propdb_hooks(request_rec *r);
void dav_fs_gather_propsets(apr_array_header_t *uris);
-int dav_fs_find_liveprop(request_rec *r, const char *ns_uri, const char *name,
+int dav_fs_find_liveprop(const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks);
void dav_fs_insert_all_liveprops(request_rec *r, const dav_resource *resource,
int insvalue, ap_text_header *phdr);
(apr_array_header_t *uris),
(uris))
AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(DAV, int, find_liveprop,
- (request_rec *r, const char *ns_uri,
- const char *name,
+ (const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks),
- (r, ns_uri, name, hooks), 0);
+ (resource, ns_uri, name, hooks), 0);
AP_IMPLEMENT_EXTERNAL_HOOK_VOID(DAV, insert_all_liveprops,
(request_rec *r, const dav_resource *resource,
int insvalue, ap_text_header *phdr),
** Return 0 if the property is not defined by the hook implementor.
*/
AP_DECLARE_EXTERNAL_HOOK(DAV, int, find_liveprop,
- (request_rec *r, const char *ns_uri, const char *name,
+ (const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks))
/*
** The following three functions are part of mod_dav's internal handling
** for the core WebDAV properties. They are not part of mod_dav's API.
*/
-int dav_core_find_liveprop(request_rec *r, const char *ns_uri,
- const char *name,
+int dav_core_find_liveprop(const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks);
void dav_core_insert_all_liveprops(request_rec *r,
const dav_resource *resource,
ns_uri = AP_XML_GET_URI_ITEM(propdb->ns_xlate, elem->ns);
/* is there a liveprop provider for this property? */
- propid = ap_run_find_liveprop(propdb->r, ns_uri, elem->name, &hooks);
+ propid = ap_run_find_liveprop(propdb->resource, ns_uri, elem->name,
+ &hooks);
if (propid != 0) {
priv->propid = propid;
priv->provider = hooks;
case DAV_PROPID_supported_live_property_set:
/* ### insert all live property names ### */
+ return DAV_PROP_INSERT_NOTDEF;
break;
case DAV_PROPID_supported_method_set:
/* ### leverage code from dav_method_options ### */
+ return DAV_PROP_INSERT_NOTDEF;
break;
case DAV_PROPID_supported_report_set:
/* assert: info != NULL && info->name != NULL */
- if (insvalue) {
+ if (insvalue && *value != '\0') {
s = apr_psprintf(p, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
global_ns, info->name, value, global_ns, info->name);
which = DAV_PROP_INSERT_VALUE;
NULL, /* patch_rollback */
};
-int dav_core_find_liveprop(request_rec *r, const char *ns_uri,
- const char *name,
+int dav_core_find_liveprop(const dav_resource *resource,
+ const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks)
{
return dav_do_find_liveprop(ns_uri, name, &dav_core_liveprop_group, hooks);