]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_dav providers define a 'can_be_activity' callback. Unfortunately,
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 21 May 2003 15:47:01 +0000 (15:47 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 21 May 2003 15:47:01 +0000 (15:47 +0000)
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@collab.net>
Reviewed by: Sander Striker, Justin Erenkrantz, Greg Stein

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@99987 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/dav/main/mod_dav.c

diff --git a/CHANGES b/CHANGES
index e917b71e448deb8fc06a95b3ff042d46dfb107b3..e2d2a21aef0fe42f7dcab8d5694061ce43a5a0c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,15 @@
 Changes with Apache 2.0.46
 
+  *) Fix for mod_dav.  Call the 'can_be_activity' callback, if provided,
+     when a MKACTIVITY request comes in.
+     [Ben Collins-Sussman <sussman@collab.net>]
+
   *) Perform run-time query in apxs for apr and apr-util's includes.
      [Justin Erenkrantz] 
-     
+
   *) run libtool from the apr install directory (in case that is different
      from the apache install directory) [Jeff Trawick]
-     
+
   *) configure.in: Play nice with libtool-1.5. [Wilfredo Sanchez]
 
   *) If mod_mime_magic does not know the content-type, do not attempt to
index a68557369e9a458c7d1dfb660918d915f7ee13c6..8be2c68ba954a4483a5db2ad290e4b6a80c2eb69 100644 (file)
@@ -4068,6 +4068,15 @@ static int dav_method_make_activity(request_rec *r)
         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 */