|
Lines 57-62
Link Here
|
| 57 |
#include "http_request.h" |
57 |
#include "http_request.h" |
| 58 |
#include "util_script.h" |
58 |
#include "util_script.h" |
| 59 |
|
59 |
|
|
|
60 |
#include "ap_provider.h" |
| 61 |
|
| 60 |
#include "mod_dav.h" |
62 |
#include "mod_dav.h" |
| 61 |
|
63 |
|
| 62 |
|
64 |
|
|
Lines 79-84
Link Here
|
| 79 |
const char *dir; |
81 |
const char *dir; |
| 80 |
int locktimeout; |
82 |
int locktimeout; |
| 81 |
int allow_depthinfinity; |
83 |
int allow_depthinfinity; |
|
|
84 |
int acl_checking; |
| 85 |
int etag_response; |
| 82 |
|
86 |
|
| 83 |
} dav_dir_conf; |
87 |
} dav_dir_conf; |
| 84 |
|
88 |
|
|
Lines 195-204
Link Here
|
| 195 |
newconf->dir = DAV_INHERIT_VALUE(parent, child, dir); |
199 |
newconf->dir = DAV_INHERIT_VALUE(parent, child, dir); |
| 196 |
newconf->allow_depthinfinity = DAV_INHERIT_VALUE(parent, child, |
200 |
newconf->allow_depthinfinity = DAV_INHERIT_VALUE(parent, child, |
| 197 |
allow_depthinfinity); |
201 |
allow_depthinfinity); |
|
|
202 |
newconf->acl_checking = DAV_INHERIT_VALUE(parent, child, acl_checking); |
| 203 |
newconf->etag_response = DAV_INHERIT_VALUE(parent, child, etag_response); |
| 198 |
|
204 |
|
| 199 |
return newconf; |
205 |
return newconf; |
| 200 |
} |
206 |
} |
| 201 |
|
207 |
|
|
|
208 |
DAV_DECLARE(const char *) dav_get_provider_name(request_rec *r) |
| 209 |
{ |
| 210 |
dav_dir_conf *conf = ap_get_module_config(r->per_dir_config, &dav_module); |
| 211 |
return conf ? conf->provider_name : NULL; |
| 212 |
} |
| 213 |
|
| 202 |
static const dav_provider *dav_get_provider(request_rec *r) |
214 |
static const dav_provider *dav_get_provider(request_rec *r) |
| 203 |
{ |
215 |
{ |
| 204 |
dav_dir_conf *conf; |
216 |
dav_dir_conf *conf; |
|
Lines 287-292
Link Here
|
| 287 |
} |
299 |
} |
| 288 |
|
300 |
|
| 289 |
/* |
301 |
/* |
|
|
302 |
* Command handler for the DAVACL directive, which is FLAG. |
| 303 |
*/ |
| 304 |
static const char *dav_cmd_acl_checking(cmd_parms *cmd, void *config, |
| 305 |
int arg) |
| 306 |
{ |
| 307 |
dav_dir_conf *conf = (dav_dir_conf *)config; |
| 308 |
|
| 309 |
conf->acl_checking = arg; |
| 310 |
return NULL; |
| 311 |
} |
| 312 |
|
| 313 |
/* |
| 314 |
* Command handler for the DAVETagResponse directive, which is FLAG. |
| 315 |
*/ |
| 316 |
static const char *dav_cmd_etag_response(cmd_parms *cmd, void *config, |
| 317 |
int arg) |
| 318 |
{ |
| 319 |
dav_dir_conf *conf = (dav_dir_conf *)config; |
| 320 |
|
| 321 |
conf->etag_response = arg; |
| 322 |
return NULL; |
| 323 |
} |
| 324 |
|
| 325 |
/* |
| 290 |
* Command handler for DAVMinTimeout directive, which is TAKE1 |
326 |
* Command handler for DAVMinTimeout directive, which is TAKE1 |
| 291 |
*/ |
327 |
*/ |
| 292 |
static const char *dav_cmd_davmintimeout(cmd_parms *cmd, void *config, |
328 |
static const char *dav_cmd_davmintimeout(cmd_parms *cmd, void *config, |
|
Lines 361-378
Link Here
|
| 361 |
ap_rputs(" xmlns:m=\"http://apache.org/dav/xmlns\"", r); |
397 |
ap_rputs(" xmlns:m=\"http://apache.org/dav/xmlns\"", r); |
| 362 |
} |
398 |
} |
| 363 |
|
399 |
|
| 364 |
if (err->namespace != NULL) { |
400 |
if (err->childtags) { |
| 365 |
ap_rprintf(r, |
401 |
if (err->namespace != NULL) { |
| 366 |
" xmlns:C=\"%s\">" DEBUG_CR |
402 |
ap_rprintf(r, |
| 367 |
"<C:%s/>" DEBUG_CR, |
403 |
" xmlns:C=\"%s\">" DEBUG_CR |
| 368 |
err->namespace, err->tagname); |
404 |
"<C:%s>%s</C:%s>" DEBUG_CR, |
| 369 |
} |
405 |
err->namespace, |
|
|
406 |
err->tagname, err->childtags, err->tagname); |
| 407 |
} |
| 408 |
else { |
| 409 |
ap_rprintf(r, |
| 410 |
">" DEBUG_CR |
| 411 |
"<D:%s>%s<D:%s>" DEBUG_CR, |
| 412 |
err->tagname, err->childtags, err->tagname); |
| 413 |
|
| 414 |
} |
| 415 |
} |
| 370 |
else { |
416 |
else { |
| 371 |
ap_rprintf(r, |
417 |
if (err->namespace != NULL) { |
| 372 |
">" DEBUG_CR |
418 |
ap_rprintf(r, |
| 373 |
"<D:%s/>" DEBUG_CR, err->tagname); |
419 |
" xmlns:C=\"%s\">" DEBUG_CR |
|
|
420 |
"<C:%s/>" DEBUG_CR, |
| 421 |
err->namespace, err->tagname); |
| 422 |
} |
| 423 |
else { |
| 424 |
ap_rprintf(r, |
| 425 |
">" DEBUG_CR |
| 426 |
"<D:%s/>" DEBUG_CR, err->tagname); |
| 427 |
} |
| 374 |
} |
428 |
} |
| 375 |
|
|
|
| 376 |
/* here's our mod_dav specific tag: */ |
429 |
/* here's our mod_dav specific tag: */ |
| 377 |
if (err->desc != NULL) { |
430 |
if (err->desc != NULL) { |
| 378 |
ap_rprintf(r, |
431 |
ap_rprintf(r, |
|
Lines 423-429
Link Here
|
| 423 |
[Presumably the <multistatus> tag has already been written; this |
476 |
[Presumably the <multistatus> tag has already been written; this |
| 424 |
routine is shared by dav_send_multistatus and dav_stream_response.] |
477 |
routine is shared by dav_send_multistatus and dav_stream_response.] |
| 425 |
*/ |
478 |
*/ |
| 426 |
static void dav_send_one_response(dav_response *response, |
479 |
void dav_send_one_response(dav_response *response, |
| 427 |
apr_bucket_brigade *bb, |
480 |
apr_bucket_brigade *bb, |
| 428 |
ap_filter_t *output, |
481 |
ap_filter_t *output, |
| 429 |
apr_pool_t *pool) |
482 |
apr_pool_t *pool) |
|
Lines 485-493
Link Here
|
| 485 |
response and write <multistatus> tag into BB, destined for |
538 |
response and write <multistatus> tag into BB, destined for |
| 486 |
R->output_filters. Use xml NAMESPACES in initial tag, if |
539 |
R->output_filters. Use xml NAMESPACES in initial tag, if |
| 487 |
non-NULL. */ |
540 |
non-NULL. */ |
| 488 |
static void dav_begin_multistatus(apr_bucket_brigade *bb, |
541 |
void dav_begin_multistatus(apr_bucket_brigade *bb, |
| 489 |
request_rec *r, int status, |
542 |
request_rec *r, int status, |
| 490 |
apr_array_header_t *namespaces) |
543 |
apr_array_header_t *namespaces) |
| 491 |
{ |
544 |
{ |
| 492 |
/* Set the correct status and Content-Type */ |
545 |
/* Set the correct status and Content-Type */ |
| 493 |
r->status = status; |
546 |
r->status = status; |
|
Lines 510-517
Link Here
|
| 510 |
} |
563 |
} |
| 511 |
|
564 |
|
| 512 |
/* Finish a multistatus response started by dav_begin_multistatus: */ |
565 |
/* Finish a multistatus response started by dav_begin_multistatus: */ |
| 513 |
static apr_status_t dav_finish_multistatus(request_rec *r, |
566 |
apr_status_t dav_finish_multistatus(request_rec *r, |
| 514 |
apr_bucket_brigade *bb) |
567 |
apr_bucket_brigade *bb) |
| 515 |
{ |
568 |
{ |
| 516 |
apr_bucket *b; |
569 |
apr_bucket *b; |
| 517 |
|
570 |
|
|
Lines 525-533
Link Here
|
| 525 |
return ap_pass_brigade(r->output_filters, bb); |
578 |
return ap_pass_brigade(r->output_filters, bb); |
| 526 |
} |
579 |
} |
| 527 |
|
580 |
|
| 528 |
static void dav_send_multistatus(request_rec *r, int status, |
581 |
void dav_send_multistatus(request_rec *r, int status, |
| 529 |
dav_response *first, |
582 |
dav_response *first, |
| 530 |
apr_array_header_t *namespaces) |
583 |
apr_array_header_t *namespaces) |
| 531 |
{ |
584 |
{ |
| 532 |
apr_pool_t *subpool; |
585 |
apr_pool_t *subpool; |
| 533 |
apr_bucket_brigade *bb = apr_brigade_create(r->pool, |
586 |
apr_bucket_brigade *bb = apr_brigade_create(r->pool, |
|
Lines 587-594
Link Here
|
| 587 |
* - repos_hooks->copy_resource |
640 |
* - repos_hooks->copy_resource |
| 588 |
* - vsn_hooks->update |
641 |
* - vsn_hooks->update |
| 589 |
*/ |
642 |
*/ |
| 590 |
static int dav_handle_err(request_rec *r, dav_error *err, |
643 |
int dav_handle_err(request_rec *r, dav_error *err, |
| 591 |
dav_response *response) |
644 |
dav_response *response) |
| 592 |
{ |
645 |
{ |
| 593 |
/* log the errors */ |
646 |
/* log the errors */ |
| 594 |
dav_log_err(r, err, APLOG_ERR); |
647 |
dav_log_err(r, err, APLOG_ERR); |
|
Lines 621-631
Link Here
|
| 621 |
int replaced) |
674 |
int replaced) |
| 622 |
{ |
675 |
{ |
| 623 |
const char *body; |
676 |
const char *body; |
|
|
677 |
dav_dir_conf *conf; |
| 624 |
|
678 |
|
| 625 |
if (locn == NULL) { |
679 |
if (locn == NULL) { |
| 626 |
locn = r->uri; |
680 |
locn = r->uri; |
| 627 |
} |
681 |
} |
| 628 |
|
682 |
|
|
|
683 |
/* ### insert an ETag header? see HTTP/1.1 S10.2.2 */ |
| 684 |
conf = ap_get_module_config(r->per_dir_config, &dav_module); |
| 685 |
|
| 686 |
/* added ETag response ... vlv disabled as well ! */ |
| 687 |
if (conf->etag_response) { |
| 688 |
char *vlv = r->vlist_validator; |
| 689 |
r->vlist_validator = NULL; |
| 690 |
apr_stat(&r->finfo, r->filename, APR_FINFO_MIN, r->pool); |
| 691 |
r->mtime = r->finfo.mtime; |
| 692 |
ap_set_etag(r); |
| 693 |
r->vlist_validator = vlv; |
| 694 |
} |
| 695 |
|
| 629 |
/* did the target resource already exist? */ |
696 |
/* did the target resource already exist? */ |
| 630 |
if (replaced) { |
697 |
if (replaced) { |
| 631 |
/* Apache will supply a default message */ |
698 |
/* Apache will supply a default message */ |
|
Lines 634-645
Link Here
|
| 634 |
|
701 |
|
| 635 |
/* Per HTTP/1.1, S10.2.2: add a Location header to contain the |
702 |
/* Per HTTP/1.1, S10.2.2: add a Location header to contain the |
| 636 |
* URI that was created. */ |
703 |
* URI that was created. */ |
| 637 |
|
704 |
|
| 638 |
/* Convert locn to an absolute URI, and return in Location header */ |
705 |
/* Convert locn to an absolute URI, and return in Location header */ |
| 639 |
apr_table_setn(r->headers_out, "Location", ap_construct_url(r->pool, locn, r)); |
706 |
apr_table_setn(r->headers_out, "Location", ap_construct_url(r->pool, locn, r)); |
| 640 |
|
707 |
|
| 641 |
/* ### insert an ETag header? see HTTP/1.1 S10.2.2 */ |
|
|
| 642 |
|
| 643 |
/* Apache doesn't allow us to set a variable body for HTTP_CREATED, so |
708 |
/* Apache doesn't allow us to set a variable body for HTTP_CREATED, so |
| 644 |
* we must manufacture the entire response. */ |
709 |
* we must manufacture the entire response. */ |
| 645 |
body = apr_psprintf(r->pool, "%s %s has been created.", |
710 |
body = apr_psprintf(r->pool, "%s %s has been created.", |
|
Lines 647-652
Link Here
|
| 647 |
return dav_error_response(r, HTTP_CREATED, body); |
712 |
return dav_error_response(r, HTTP_CREATED, body); |
| 648 |
} |
713 |
} |
| 649 |
|
714 |
|
|
|
715 |
|
| 650 |
/* ### move to dav_util? */ |
716 |
/* ### move to dav_util? */ |
| 651 |
DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth) |
717 |
DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth) |
| 652 |
{ |
718 |
{ |
|
Lines 711-717
Link Here
|
| 711 |
dav_dir_conf *conf; |
777 |
dav_dir_conf *conf; |
| 712 |
const char *label = NULL; |
778 |
const char *label = NULL; |
| 713 |
dav_error *err; |
779 |
dav_error *err; |
| 714 |
|
780 |
|
| 715 |
/* if the request target can be overridden, get any target selector */ |
781 |
/* if the request target can be overridden, get any target selector */ |
| 716 |
if (label_allowed) { |
782 |
if (label_allowed) { |
| 717 |
label = apr_table_get(r->headers_in, "label"); |
783 |
label = apr_table_get(r->headers_in, "label"); |
|
Lines 745-750
Link Here
|
| 745 |
* add it now */ |
811 |
* add it now */ |
| 746 |
dav_add_vary_header(r, r, *res_p); |
812 |
dav_add_vary_header(r, r, *res_p); |
| 747 |
|
813 |
|
|
|
814 |
/* if acls checking -> check if allowed method excluding propfind */ |
| 815 |
if (conf->acl_checking && |
| 816 |
((*res_p)->acl_hooks = dav_get_acl_hooks()) && |
| 817 |
(err = (*res_p)->acl_hooks->acl_check_method(r, *res_p))) |
| 818 |
return err; |
| 819 |
|
| 748 |
return NULL; |
820 |
return NULL; |
| 749 |
} |
821 |
} |
| 750 |
|
822 |
|
|
Lines 1092-1102
Link Here
|
| 1092 |
return dav_handle_err(r, err, NULL); |
1164 |
return dav_handle_err(r, err, NULL); |
| 1093 |
} |
1165 |
} |
| 1094 |
} |
1166 |
} |
| 1095 |
|
1167 |
|
| 1096 |
/* NOTE: WebDAV spec, S8.7.1 states properties should be unaffected */ |
1168 |
/* NOTE: WebDAV spec, S8.7.1 states properties should be unaffected */ |
| 1097 |
|
1169 |
|
| 1098 |
/* return an appropriate response (HTTP_CREATED or HTTP_NO_CONTENT) */ |
1170 |
/* return an appropriate response (HTTP_CREATED or HTTP_NO_CONTENT) */ |
| 1099 |
return dav_created(r, NULL, "Resource", resource_state == DAV_RESOURCE_EXISTS); |
1171 |
int rc = dav_created(r, NULL, "Resource", resource_state == DAV_RESOURCE_EXISTS); |
|
|
1172 |
|
| 1173 |
if (resource->acl_hooks) |
| 1174 |
resource->acl_hooks->acl_post_processing(r, resource, r->status == HTTP_CREATED); |
| 1175 |
|
| 1176 |
return rc; |
| 1100 |
} |
1177 |
} |
| 1101 |
|
1178 |
|
| 1102 |
|
1179 |
|
|
Lines 1245-1250
Link Here
|
| 1245 |
dav_log_err(r, err, APLOG_WARNING); |
1322 |
dav_log_err(r, err, APLOG_WARNING); |
| 1246 |
} |
1323 |
} |
| 1247 |
|
1324 |
|
|
|
1325 |
if (resource->acl_hooks) |
| 1326 |
resource->acl_hooks->acl_post_processing(r, resource, 0); |
| 1327 |
|
| 1248 |
/* ### HTTP_NO_CONTENT if no body, HTTP_OK if there is a body (some day) */ |
1328 |
/* ### HTTP_NO_CONTENT if no body, HTTP_OK if there is a body (some day) */ |
| 1249 |
|
1329 |
|
| 1250 |
/* Apache will supply a default error for this. */ |
1330 |
/* Apache will supply a default error for this. */ |
|
Lines 1609-1614
Link Here
|
| 1609 |
if (binding_hooks != NULL) |
1689 |
if (binding_hooks != NULL) |
| 1610 |
dav_level = apr_pstrcat(r->pool, dav_level, ",bindings", NULL); |
1690 |
dav_level = apr_pstrcat(r->pool, dav_level, ",bindings", NULL); |
| 1611 |
|
1691 |
|
|
|
1692 |
{ /* DAV header additions registered by external modules */ |
| 1693 |
int i; |
| 1694 |
apr_array_header_t *extensions = |
| 1695 |
ap_list_provider_names(r->pool, DAV_OPTIONS_EXTENSION_GROUP, "0"); |
| 1696 |
ap_list_provider_names_t *entry = |
| 1697 |
(ap_list_provider_names_t *)extensions->elts; |
| 1698 |
|
| 1699 |
for (i = 0; i < extensions->nelts; i++, entry++) { |
| 1700 |
const dav_hooks_options *options = |
| 1701 |
dav_get_options_hooks(entry->provider_name); |
| 1702 |
|
| 1703 |
if (options && options->dav_header) { |
| 1704 |
apr_text_header hoptions = { 0 }; |
| 1705 |
|
| 1706 |
options->dav_header(r, resource, &hoptions); |
| 1707 |
for (t = hoptions.first; t && t->text; t = t->next) |
| 1708 |
dav_level = apr_pstrcat(r->pool, dav_level, ",", t->text, NULL); |
| 1709 |
} |
| 1710 |
} |
| 1711 |
} |
| 1712 |
|
| 1612 |
/* ### |
1713 |
/* ### |
| 1613 |
* MSFT Web Folders chokes if length of DAV header value > 63 characters! |
1714 |
* MSFT Web Folders chokes if length of DAV header value > 63 characters! |
| 1614 |
* To workaround that, we use separate DAV headers for versioning and |
1715 |
* To workaround that, we use separate DAV headers for versioning and |
|
Lines 1670-1676
Link Here
|
| 1670 |
apr_table_addn(methods, "COPY", ""); |
1771 |
apr_table_addn(methods, "COPY", ""); |
| 1671 |
apr_table_addn(methods, "MOVE", ""); |
1772 |
apr_table_addn(methods, "MOVE", ""); |
| 1672 |
|
1773 |
|
| 1673 |
if (!resource->collection) |
1774 |
/* if (!resource->collection) */ |
| 1674 |
apr_table_addn(methods, "PUT", ""); |
1775 |
apr_table_addn(methods, "PUT", ""); |
| 1675 |
|
1776 |
|
| 1676 |
if (locks_hooks != NULL) { |
1777 |
if (locks_hooks != NULL) { |
|
Lines 1752-1757
Link Here
|
| 1752 |
apr_table_addn(methods, "SEARCH", ""); |
1853 |
apr_table_addn(methods, "SEARCH", ""); |
| 1753 |
} |
1854 |
} |
| 1754 |
|
1855 |
|
|
|
1856 |
{ /* additional methods registered by external modules */ |
| 1857 |
int i; |
| 1858 |
apr_array_header_t *extensions = |
| 1859 |
ap_list_provider_names(r->pool, DAV_OPTIONS_EXTENSION_GROUP, "0"); |
| 1860 |
ap_list_provider_names_t *entry = |
| 1861 |
(ap_list_provider_names_t *)extensions->elts; |
| 1862 |
|
| 1863 |
for (i = 0; i < extensions->nelts; i++, entry++) { |
| 1864 |
const dav_hooks_options *options = |
| 1865 |
dav_get_options_hooks(entry->provider_name); |
| 1866 |
|
| 1867 |
if (options && options->dav_method) { |
| 1868 |
apr_text_header hoptions = { 0 }; |
| 1869 |
|
| 1870 |
options->dav_method(r, resource, &hoptions); |
| 1871 |
for (t = hoptions.first; t && t->text; t = t->next) |
| 1872 |
apr_table_addn(methods, t->text, ""); |
| 1873 |
} |
| 1874 |
} |
| 1875 |
} |
| 1876 |
|
| 1755 |
/* Generate the Allow header */ |
1877 |
/* Generate the Allow header */ |
| 1756 |
arr = apr_table_elts(methods); |
1878 |
arr = apr_table_elts(methods); |
| 1757 |
elts = (const apr_table_entry_t *)arr->elts; |
1879 |
elts = (const apr_table_entry_t *)arr->elts; |
|
Lines 2023-2029
Link Here
|
| 2023 |
"the required child elements (the specific command)."); |
2145 |
"the required child elements (the specific command)."); |
| 2024 |
return HTTP_BAD_REQUEST; |
2146 |
return HTTP_BAD_REQUEST; |
| 2025 |
} |
2147 |
} |
| 2026 |
|
2148 |
if (resource->acl_hooks && |
|
|
2149 |
(ctx.propfind_type == DAV_PROPFIND_IS_PROPNAME || |
| 2150 |
ctx.propfind_type == DAV_PROPFIND_IS_ALLPROP) && |
| 2151 |
(err = resource->acl_hooks->acl_check_read(r, resource))) |
| 2152 |
return dav_handle_err(r, err, NULL); |
| 2153 |
|
| 2027 |
ctx.w.walk_type = DAV_WALKTYPE_NORMAL | DAV_WALKTYPE_AUTH; |
2154 |
ctx.w.walk_type = DAV_WALKTYPE_NORMAL | DAV_WALKTYPE_AUTH; |
| 2028 |
ctx.w.func = dav_propfind_walker; |
2155 |
ctx.w.func = dav_propfind_walker; |
| 2029 |
ctx.w.walk_ctx = &ctx; |
2156 |
ctx.w.walk_ctx = &ctx; |
|
Lines 2088-2095
Link Here
|
| 2088 |
return DONE; |
2215 |
return DONE; |
| 2089 |
} |
2216 |
} |
| 2090 |
|
2217 |
|
| 2091 |
static apr_text * dav_failed_proppatch(apr_pool_t *p, |
2218 |
apr_text * dav_failed_proppatch(apr_pool_t *p, |
| 2092 |
apr_array_header_t *prop_ctx) |
2219 |
apr_array_header_t *prop_ctx) |
| 2093 |
{ |
2220 |
{ |
| 2094 |
apr_text_header hdr = { 0 }; |
2221 |
apr_text_header hdr = { 0 }; |
| 2095 |
int i = prop_ctx->nelts; |
2222 |
int i = prop_ctx->nelts; |
|
Lines 2149-2155
Link Here
|
| 2149 |
return hdr.first; |
2276 |
return hdr.first; |
| 2150 |
} |
2277 |
} |
| 2151 |
|
2278 |
|
| 2152 |
static apr_text * dav_success_proppatch(apr_pool_t *p, apr_array_header_t *prop_ctx) |
2279 |
apr_text * dav_success_proppatch(apr_pool_t *p, apr_array_header_t *prop_ctx) |
| 2153 |
{ |
2280 |
{ |
| 2154 |
apr_text_header hdr = { 0 }; |
2281 |
apr_text_header hdr = { 0 }; |
| 2155 |
int i = prop_ctx->nelts; |
2282 |
int i = prop_ctx->nelts; |
|
Lines 2370-2375
Link Here
|
| 2370 |
|
2497 |
|
| 2371 |
dav_send_multistatus(r, HTTP_MULTI_STATUS, &resp, doc->namespaces); |
2498 |
dav_send_multistatus(r, HTTP_MULTI_STATUS, &resp, doc->namespaces); |
| 2372 |
|
2499 |
|
|
|
2500 |
if (resource->acl_hooks) |
| 2501 |
resource->acl_hooks->acl_post_processing(r, resource, 0); |
| 2502 |
|
| 2373 |
/* the response has been sent. */ |
2503 |
/* the response has been sent. */ |
| 2374 |
return DONE; |
2504 |
return DONE; |
| 2375 |
} |
2505 |
} |
|
Lines 2546-2553
Link Here
|
| 2546 |
} |
2676 |
} |
| 2547 |
} |
2677 |
} |
| 2548 |
|
2678 |
|
|
|
2679 |
|
| 2549 |
/* return an appropriate response (HTTP_CREATED) */ |
2680 |
/* return an appropriate response (HTTP_CREATED) */ |
| 2550 |
return dav_created(r, NULL, "Collection", 0); |
2681 |
int rc = dav_created(r, NULL, "Collection", 0); |
|
|
2682 |
|
| 2683 |
if (resource->acl_hooks) |
| 2684 |
resource->acl_hooks->acl_post_processing(r, resource, r->status == 201); |
| 2685 |
|
| 2686 |
return rc; |
| 2551 |
} |
2687 |
} |
| 2552 |
|
2688 |
|
| 2553 |
/* handle the COPY and MOVE methods */ |
2689 |
/* handle the COPY and MOVE methods */ |
|
Lines 2949-2957
Link Here
|
| 2949 |
} |
3085 |
} |
| 2950 |
} |
3086 |
} |
| 2951 |
|
3087 |
|
|
|
3088 |
|
| 2952 |
/* return an appropriate response (HTTP_CREATED or HTTP_NO_CONTENT) */ |
3089 |
/* return an appropriate response (HTTP_CREATED or HTTP_NO_CONTENT) */ |
| 2953 |
return dav_created(r, lookup.rnew->uri, "Destination", |
3090 |
int rc = dav_created(r, lookup.rnew->uri, "Destination", |
| 2954 |
resnew_state == DAV_RESOURCE_EXISTS); |
3091 |
resnew_state == DAV_RESOURCE_EXISTS); |
|
|
3092 |
|
| 3093 |
if (resource->acl_hooks) |
| 3094 |
resource->acl_hooks->acl_post_processing(r, is_move ? resource : resnew, |
| 3095 |
r->status == 201); |
| 3096 |
|
| 3097 |
return rc; |
| 2955 |
} |
3098 |
} |
| 2956 |
|
3099 |
|
| 2957 |
/* dav_method_lock: Handler to implement the DAV LOCK method |
3100 |
/* dav_method_lock: Handler to implement the DAV LOCK method |
|
Lines 4816-4821
Link Here
|
| 4816 |
ACCESS_CONF|RSRC_CONF, |
4959 |
ACCESS_CONF|RSRC_CONF, |
| 4817 |
"allow Depth infinity PROPFIND requests"), |
4960 |
"allow Depth infinity PROPFIND requests"), |
| 4818 |
|
4961 |
|
|
|
4962 |
/* per directory/location, or per server */ |
| 4963 |
AP_INIT_FLAG("DAVETagResponse", dav_cmd_etag_response, NULL, |
| 4964 |
ACCESS_CONF|RSRC_CONF, |
| 4965 |
"response with ETag for dav_created"), |
| 4966 |
|
| 4967 |
/* per directory/location, or per server */ |
| 4968 |
AP_INIT_FLAG("DAVACL", dav_cmd_acl_checking, NULL, |
| 4969 |
ACCESS_CONF|RSRC_CONF, |
| 4970 |
"Access Control List as per rfc3744"), |
| 4971 |
|
| 4819 |
{ NULL } |
4972 |
{ NULL } |
| 4820 |
}; |
4973 |
}; |
| 4821 |
|
4974 |
|