mod_dav isn't calling it before creating an activity. This is a
required precondition (along with the resource not existing), as
defined in the deltaV RFC (3253), section 13.5.
* mod_dav.c (dav_method_make_activity): if available, call provider's
'can_be_activity' callback as a precondition to making an activity.
Submitted by: Ben Collins-Sussman <sussman@apache.org>
Reviewed by: Sander Striker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99966
13f79535-47bb-0310-9956-
ffa450edef68
[Remove entries to the current 2.0 section below, when backported]
+ *) Fix for mod_dav. Call the 'can_be_activity' callback, if provided,
+ when a MKACTIVITY request comes in.
+ [Ben Collins-Sussman <sussman@apache.org>]
+
*) configure.in: Play nice with libtool-1.5. [Wilfredo Sanchez]
*) Prevent the server from crashing when entering infinite loops. The
return dav_handle_err(r, err, NULL);
}
+ /* the provider must say whether the resource can be created as
+ an activity, i.e. whether the location is ok. */
+ if (vsn_hooks->can_be_activity != NULL
+ && !(*vsn_hooks->can_be_activity)(resource)) {
+ err = dav_new_error(r->pool, HTTP_FORBIDDEN, 0,
+ "<DAV:activity-location-ok/>");
+ return dav_handle_err(r, err, NULL);
+ }
+
/* ### what about locking? */
/* attempt to create the activity */