[prev in list] [next in list] [prev in thread] [next in thread]
List: dav-cvs
Subject: [dav-checkins] CVS: mod_dav mod_dav.c
From: Keith Wannamaker (CVS User) <keith () nebula ! lyra ! org>
Date: 2001-07-23 0:12:47
[Download RAW message or body]
keith 01/07/22 17:12:47
Modified: . Tag: V1_0_patches mod_dav.c
Log:
Fix bug that returned 500 when locking a resource with a missing
intermediate collection. This is now explicitly checked.
Reported by: Dan Brotsky <DBrotsky@Adobe.Com>
Revision Changes Path
No revision
No revision
1.129.2.7 +12 -0 mod_dav/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvsroot/mod_dav/mod_dav.c,v
retrieving revision 1.129.2.6
retrieving revision 1.129.2.7
diff -u -r1.129.2.6 -r1.129.2.7
--- mod_dav.c 2001/01/25 21:03:37 1.129.2.6
+++ mod_dav.c 2001/07/23 00:12:45 1.129.2.7
@@ -2620,6 +2620,7 @@
{
dav_error *err;
dav_resource *resource;
+ dav_resource *parent_resource = NULL;
const dav_hooks_locks *locks_hooks;
int result;
int depth;
@@ -2649,6 +2650,17 @@
result = dav_get_resource(r, &resource);
if (result != OK)
return result;
+
+ parent_resource = (*resource->hooks->get_parent_resource)(resource);
+ if (parent_resource == NULL || !parent_resource->exists) {
+ const char *body = ap_psprintf(r->pool,
+ "Missing one or more intermediate collections. "
+ "Cannot lock resource %s.",
+ ap_escape_html(r->pool, resource->uri));
+ return dav_handle_err(r,
+ dav_new_error(r->pool, HTTP_CONFLICT, 0, body), NULL);
+ }
+
/*
** Open writable. Unless an error occurs, we'll be
_______________________________________________
dav-checkins maillist - dav-checkins@lyra.org
http://dav.lyra.org/mailman/listinfo/dav-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic