From: Greg Stein Date: Thu, 19 Jun 2003 21:21:15 +0000 (+0000) Subject: Fix a crasher introduced on June 3. X-Git-Tag: pre_ajp_proxy~1529 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b429aa0072db7d23eb7d3ea9397ff0e077e0f25;p=apache 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 --- 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);