]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
protect as in r1936401
authorEric Covener <covener@apache.org>
Mon, 20 Jul 2026 19:55:13 +0000 (19:55 +0000)
committerEric Covener <covener@apache.org>
Mon, 20 Jul 2026 19:55:13 +0000 (19:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936403 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_dir.c

index fdf64ae2288a7c14bf49b40f6ae84e602802e802..53ecf0e533c600bff215bc7cab442439cd343523 100644 (file)
@@ -312,7 +312,7 @@ static int fixup_dir(request_rec *r)
     /* we're running between mod_rewrites fixup and its internal redirect handler, step aside */
     if (!strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) { 
         /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
-        if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) { 
+        if (r->content_type && !strcmp(r->content_type, DIR_MAGIC_TYPE)) {
             r->content_type = NULL;
         }
         return DECLINED;