From dev-return-43981-apmail-httpd-dev-archive=httpd.apache.org@httpd.apache.org Fri Sep 10 07:33:51 2004 Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 72724 invoked from network); 10 Sep 2004 07:33:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Sep 2004 07:33:51 -0000 Received: (qmail 69510 invoked by uid 500); 10 Sep 2004 07:33:41 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 69394 invoked by uid 500); 10 Sep 2004 07:33:39 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 69373 invoked by uid 99); 10 Sep 2004 07:33:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [217.115.66.8] (HELO plim.fujitsu-siemens.com) (217.115.66.8) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 10 Sep 2004 00:33:38 -0700 Received: from trulli.pdb.fsc.net ([172.25.96.53]) by plim.fujitsu-siemens.com (8.11.3/8.11.3) with ESMTP id i8A7XYo06223 for ; Fri, 10 Sep 2004 09:33:34 +0200 Received: from deejai2.mch.fsc.net (deejai2.mch.fsc.net [172.25.124.236]) by trulli.pdb.fsc.net (8.11.6/8.11.6) with ESMTP id i8A7XYu03252 for ; Fri, 10 Sep 2004 09:33:34 +0200 Received: from fujitsu-siemens.com (4r8np6ksgmky5b6m@deejai2.mch.fsc.net [172.25.124.236]) by deejai2.mch.fsc.net (8.12.11/8.12.11) with ESMTP id i8A7TAXh059762 for ; Fri, 10 Sep 2004 09:29:10 +0200 (CEST) (envelope-from jfrederic.clere@fujitsu-siemens.com) Message-ID: <414158F6.2010602@fujitsu-siemens.com> Date: Fri, 10 Sep 2004 09:34:14 +0200 From: jean-frederic clere Reply-To: jfrederic.clere@fujitsu-siemens.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040517 X-Accept-Language: ca, en, fr, de MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r->filename References: In-Reply-To: X-Enigmail-Version: 0.84.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jeff Trawick wrote: > See attached patch. Given a module with map-to-storage hook which > leaves r->filename NULL, and config like the following, you get > segfault on platforms that don't like strlen(NULL). > > > RewriteEngine On > RewriteCond %{SERVER_PORT} ^8080$ > RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} > > > /silly is handled by a module which implements a map-to-storage hook > and leaves r->filename NULL Why not returning DECLINED when r->filename is NULL? > > comments? better way to do it? > > odd to me that rewrite's translate_name hook, used for processing > server config directives, can update r->filename permanently even when > it declines