dav_validate_walker: Walker callback function to validate resource state */
| 1477 | |
| 1478 | /* dav_validate_walker: Walker callback function to validate resource state */ |
| 1479 | static dav_error * dav_validate_walker(dav_walk_resource *wres, int calltype) |
| 1480 | { |
| 1481 | dav_walker_ctx *ctx = wres->walk_ctx; |
| 1482 | dav_error *err; |
| 1483 | |
| 1484 | if ((err = dav_validate_resource_state(ctx->w.pool, wres->resource, |
| 1485 | ctx->w.lockdb, |
| 1486 | ctx->if_header, ctx->flags, |
| 1487 | &ctx->work_buf, ctx->r)) == NULL) { |
| 1488 | /* There was no error, so just bug out. */ |
| 1489 | return NULL; |
| 1490 | } |
| 1491 | |
| 1492 | /* |
| 1493 | ** If we have a serious server error, or if the request itself failed, |
| 1494 | ** then just return error (not a multistatus). |
| 1495 | */ |
| 1496 | if (ap_is_HTTP_SERVER_ERROR(err->status) |
| 1497 | || (*wres->resource->hooks->is_same_resource)(wres->resource, |
| 1498 | ctx->w.root)) { |
| 1499 | /* ### maybe push a higher-level description? */ |
| 1500 | return err; |
| 1501 | } |
| 1502 | |
| 1503 | /* associate the error with the current URI */ |
| 1504 | dav_add_response(wres, err->status, NULL); |
| 1505 | |
| 1506 | return NULL; |
| 1507 | } |
| 1508 | |
| 1509 | /* If-* header checking */ |
| 1510 | static int dav_meets_conditions(request_rec *r, int resource_state) |
nothing calls this directly
no test coverage detected