From 9b429aa0072db7d23eb7d3ea9397ff0e077e0f25 Mon Sep 17 00:00:00 2001 From: Greg Stein Date: Thu, 19 Jun 2003 21:21:15 +0000 Subject: [PATCH] Fix a crasher introduced on June 3. * mod_dav.c (dav_method_propfind): the PROPFIND request might not have a body. Therefore, we cannot dereference 'doc' unconditionally. Test it to decide what to pass on to dav_begin_multistatus(). Submitted by: Ben Collins-Sussman , David Waite git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100308 13f79535-47bb-0310-9956-ffa450edef68 --- modules/dav/main/mod_dav.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index affc4ed049..1536c5f01d 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -2049,7 +2049,8 @@ static int dav_method_propfind(request_rec *r) 404. Note that elements will override these ns0, ns1, etc, but NOT within the scope for the badprops. */ - dav_begin_multistatus(ctx.bb, r, HTTP_MULTI_STATUS, doc->namespaces); + dav_begin_multistatus(ctx.bb, r, HTTP_MULTI_STATUS, + doc ? doc->namespaces : NULL); /* Have the provider walk the resource. */ err = (*resource->hooks->walk)(&ctx.w, depth, &multi_status); -- 2.40.0