]> granicus.if.org Git - apache/commitdiff
Fix a crasher introduced on June 3.
authorGreg Stein <gstein@apache.org>
Thu, 19 Jun 2003 21:21:15 +0000 (21:21 +0000)
committerGreg Stein <gstein@apache.org>
Thu, 19 Jun 2003 21:21:15 +0000 (21:21 +0000)
* 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 <sussman@collab.net>,
              David Waite <mass@akuma.org>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100308 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/mod_dav.c

index affc4ed049062a3b4f3434d78170dbc3cbd27e63..1536c5f01dcb2f09d149031b06bfece9c8e1dd5f 100644 (file)
@@ -2049,7 +2049,8 @@ static int dav_method_propfind(request_rec *r)
        404. Note that <response> elements will override these ns0,
        ns1, etc, but NOT within the <response> 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);