Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 56199 invoked from network); 26 Sep 2009 19:42:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Sep 2009 19:42:46 -0000 Received: (qmail 92096 invoked by uid 500); 26 Sep 2009 19:42:45 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 92019 invoked by uid 500); 26 Sep 2009 19:42:45 -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 92010 invoked by uid 99); 26 Sep 2009 19:42:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Sep 2009 19:42:45 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of vincent@gryzor.com does not designate 212.27.42.1 as permitted sender) Received: from [212.27.42.1] (HELO smtp1-g21.free.fr) (212.27.42.1) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Sep 2009 19:42:35 +0000 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id 5F75A9400A4 for ; Sat, 26 Sep 2009 21:42:07 +0200 (CEST) Received: from fydelkass.edenwall.com (fydelkass.inl.fr [88.171.131.12]) by smtp1-g21.free.fr (Postfix) with ESMTP id 8248A9400F9 for ; Sat, 26 Sep 2009 21:42:05 +0200 (CEST) Received: from [10.8.0.30] by fydelkass.edenwall.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Mrd9h-0002gi-6g for dev@httpd.apache.org; Sat, 26 Sep 2009 21:42:05 +0200 Message-ID: <4ABE6E87.60503@gryzor.com> Date: Sat, 26 Sep 2009 21:41:59 +0200 From: Vincent Deffontaines User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [PATCH] Log inconsistency on rewrite [F] Content-Type: multipart/mixed; boundary="------------070304040702010707000208" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------070304040702010707000208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Greetings, A stupid config example to make my point : Loglevel debug RewriteEngine On RewriteRule .* - [F] This denies all requests, and logs nothing at all in error log to explain that behavior. This is contrary to a common Apache behavior about all non 2XX answers triggering an explanation message in error log. For instance, "deny from all" does. It means people need to set RewriteLog stuff to even find out that Rewrite was the source of the 403, which is IMHO bad. I am therefore submitting this trivial patch against trunk's rewrite.c : all it does is to add an error log entry when rewrite triggers a [F] rule. I hope someone will kindly apply it, or please bash me :) Regards, gryzor --------------070304040702010707000208 Content-Type: text/x-patch; name="rewrite_403_log.patch" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="rewrite_403_log.patch" Index: mod_rewrite.c =================================================================== --- mod_rewrite.c (révision 819195) +++ mod_rewrite.c (copie de travail) @@ -3460,6 +3460,9 @@ if (!*key || !strcasecmp(key, "orbidden")) { /* forbidden */ cfg->flags |= (RULEFLAG_STATUS | RULEFLAG_NOSUB); cfg->forced_responsecode = HTTP_FORBIDDEN; + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "client denied by rewrite [F] rule: %s", + r->filename ? r->filename : r->uri); } else { ++error; --------------070304040702010707000208--