MCPcopy Create free account
hub / github.com/apache/httpd / dav_validate_walker

Function dav_validate_walker

modules/dav/main/util.c:1479–1507  ·  view source on GitHub ↗

dav_validate_walker: Walker callback function to validate resource state */

Source from the content-addressed store, hash-verified

1477
1478/* dav_validate_walker: Walker callback function to validate resource state */
1479static 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 */
1510static int dav_meets_conditions(request_rec *r, int resource_state)

Callers

nothing calls this directly

Calls 2

dav_add_responseFunction · 0.85

Tested by

no test coverage detected