From: Greg Stein Date: Thu, 8 Feb 2001 11:31:02 +0000 (+0000) Subject: *) make sure the status line is set on custom responses X-Git-Tag: APACHE_2_0_2001_02_09~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a034b346dbe69e09d7b60b8b52fc1047abfb0d6a;p=apache *) make sure the status line is set on custom responses *) allow CHECKOUT on version resources git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88021 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index 0c3168f484..72213d0b94 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -352,6 +352,7 @@ static const char *dav_cmd_davparam(cmd_parms *cmd, void *config, static int dav_error_response(request_rec *r, int status, const char *body) { r->status = status; + r->status_line = ap_get_status_line(status); r->content_type = "text/html"; /* since we're returning DONE, ensure the request body is consumed. */ @@ -3328,6 +3329,8 @@ static int dav_method_checkout(request_rec *r) else { const ap_xml_elem *child = aset->first_child; + activities = apr_make_array(r->pool, 1, sizeof(const char *)); + for (; child != NULL; child = child->next) { if (child->ns == AP_XML_NS_DAV_ID && strcmp(child->name, "href") == 0) { @@ -3367,7 +3370,8 @@ static int dav_method_checkout(request_rec *r) /* Check the state of the resource: must be a file or collection, * must be versioned, and must not already be checked out. */ - if (resource->type != DAV_RESOURCE_TYPE_REGULAR) { + if (resource->type != DAV_RESOURCE_TYPE_REGULAR + && resource->type != DAV_RESOURCE_TYPE_VERSION) { return dav_error_response(r, HTTP_CONFLICT, "Cannot checkout this type of resource."); }