Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 135CED0B9 for ; Fri, 12 Oct 2012 08:36:35 +0000 (UTC) Received: (qmail 45682 invoked by uid 500); 12 Oct 2012 08:36:34 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 45602 invoked by uid 500); 12 Oct 2012 08:36:33 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 45587 invoked by uid 99); 12 Oct 2012 08:36:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 08:36:32 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of vincent@gryzor.com does not designate 212.27.42.3 as permitted sender) Received: from [212.27.42.3] (HELO smtp3-g21.free.fr) (212.27.42.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2012 08:36:23 +0000 Received: from [192.168.0.13] (unknown [88.182.32.210]) by smtp3-g21.free.fr (Postfix) with ESMTP id 70034A630C for ; Fri, 12 Oct 2012 10:35:59 +0200 (CEST) Message-ID: <5077D66D.1080904@gryzor.com> Date: Fri, 12 Oct 2012 10:35:57 +0200 From: Vincent Deffontaines User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [Patch] Support for Fallbackresource disabled X-Enigmail-Version: 1.4.1 Content-Type: multipart/mixed; boundary="------------080705000102090803060007" This is a multi-part message in MIME format. --------------080705000102090803060007 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Greetings, While providing support on IRC, I noticed that FallbackResource lacks a 'turn-off' switch. Since it works in per dir config, it seems sane that it could be valuable to turn it off in chosen subdirs. This one liner patch adds support for the keyword 'disabled' (stolen from userdir). Of course, the pitfall is that you cannot fallbackresource to a resource named "disabled". This patch is against 2.4. I will commit the updated documentation and suggest the same patch for 2.2 if this is accepted. Regards, Gryzor -- "I never look behind me, my troubles will be few" Supertramp --------------080705000102090803060007 Content-Type: text/x-diff; name="mod_dir_fallbackresource_disabled.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="mod_dir_fallbackresource_disabled.patch" Index: mod_dir.c =================================================================== --- mod_dir.c (révision 1397126) +++ mod_dir.c (copie de travail) @@ -162,7 +163,7 @@ int error_notfound = 0; name_ptr = d->dflt; - if (name_ptr == NULL) { + if ((name_ptr == NULL) || !(strcasecmp(name_ptr,"disabled"))){ return DECLINED; } /* XXX: if FallbackResource points to something that doesn't exist, --------------080705000102090803060007--