Author: cmpilato
Date: Mon May  2 14:54:07 2011
New Revision: 1098608

URL: http://svn.apache.org/viewvc?rev=1098608&view=rev
Log:
Disallow GETs of baselined versions of resources, as they don't really
fit the file-contents-or-directory-listing paradigm so well.

* subversion/mod_dav_svn/repos.c
  (deliver): Fail with a "409 Conflict" status if asked to deliver a
    baselined resources.

Modified:
    subversion/trunk/subversion/mod_dav_svn/repos.c

Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1098608&r1=1098607&r2=1098608&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/repos.c Mon May  2 14:54:07 2011
@@ -3152,10 +3152,11 @@ deliver(const dav_resource *resource, ap
   apr_status_t status;
 
   /* Check resource type */
-  if (resource->type != DAV_RESOURCE_TYPE_REGULAR
-      && resource->type != DAV_RESOURCE_TYPE_VERSION
-      && resource->type != DAV_RESOURCE_TYPE_WORKING
-      && resource->info->restype != DAV_SVN_RESTYPE_PARENTPATH_COLLECTION)
+  if (resource->baselined
+      || (resource->type != DAV_RESOURCE_TYPE_REGULAR
+          && resource->type != DAV_RESOURCE_TYPE_VERSION
+          && resource->type != DAV_RESOURCE_TYPE_WORKING
+          && resource->info->restype != DAV_SVN_RESTYPE_PARENTPATH_COLLECTION))
     {
       return dav_svn__new_error(resource->pool, HTTP_CONFLICT, 0,
                                 "Cannot GET this type of resource.");


Reply via email to