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 3D2EECCA7 for ; Wed, 26 Jun 2013 13:02:48 +0000 (UTC) Received: (qmail 86406 invoked by uid 500); 26 Jun 2013 13:02:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 86306 invoked by uid 500); 26 Jun 2013 13:02:46 -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 86298 invoked by uid 99); 26 Jun 2013 13:02:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 13:02:45 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: encountered temporary error during SPF processing of domain of jim@jagunet.com) Received: from [76.96.62.80] (HELO qmta08.westchester.pa.mail.comcast.net) (76.96.62.80) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 13:02:40 +0000 Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) by qmta08.westchester.pa.mail.comcast.net with comcast id szRG1l0031ap0As5811zUC; Wed, 26 Jun 2013 13:01:59 +0000 Received: from [192.168.199.10] ([69.251.80.74]) by omta22.westchester.pa.mail.comcast.net with comcast id t11y1l0151cCKD93i11zsj; Wed, 26 Jun 2013 13:01:59 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Revisiting the pre_htaccess hook From: Jim Jagielski In-Reply-To: Date: Wed, 26 Jun 2013 09:01:58 -0400 Cc: Stefan Fritsch , "Steinar H. Gunderson" Content-Transfer-Encoding: 7bit Message-Id: <437B5AE7-D562-4CCB-B3D8-D586AC545E43@jaguNET.com> References: <201306091157.55040.sf@sfritsch.de> To: dev@httpd.apache.org X-Mailer: Apple Mail (2.1508) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1372251719; bh=iwoNl8VqfyTZvXsu+j7yaqcRkA/Ot+8TusE5jkDsWfo=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=ec8jY8hBbCWa4VguczTKhCl/hyMPG10rIT7vG/CS06RjYhBej5SnzUH5RDWzftWrI HHJDXFyAHulU/tE6zqJDSXtL0G8LBIHThJTUe4cC21Dy9Di80QMo3mZsmFUye6/2zf eYJDCAPUZqmsi/Jq+t+JjwhpVB7qwh8nTEB3b/QajoZmi4OijQdXSkuL1fyF4TmIR6 IQf+AdCbHKvuTiVTq3wvkzUvmu90dqR+lxkIezTyG3NTZya/C+4XAj4E9aQbxDqGYJ vJBMEhPvGJCW/mYrX7BTTBkni37h4cIlF1oFCUgQ7QtV7Pc3QBnmLbFCgdL3pjus9w 1a6pm35PdeOFg== X-Virus-Checked: Checked by ClamAV on apache.org I like the idea as well... The only issue I see is wondering if/when we'll have the implementation. On Jun 25, 2013, at 9:12 AM, Jeff Trawick wrote: > On Sun, Jun 9, 2013 at 5:57 AM, Stefan Fritsch wrote: > Hi, > > first of all, sorry that it took me so long to review at this. > > The current pre_access hook is executed before opening the htaccess > and then can abort the request with a HTTP error code. > > Wouldn't a hook for opening the htaccess file make more sense because > it would have more possible use cases? Then modules could use this > hook to find htaccess files somewhere else, generate/extend/filter > them on the fly, etc. For example: > > apr_status_t ap_run_open_htaccess(request_rec *r, ap_configfile_t *f, > const char **full_name, const char *dirname, const char *accessname); > > The hook would then build full_name (used later for error logging) > from dirname and accessname and open it with ap_pcfg_openfile(). > > Downside would be that the hook cannot provide an arbitrary HTTP > status code. Only no error and FORBIDDEN. Would that be a problem? > > We could add an additional int *request_status parameter, too, though. > Or put the error logging/generating of FORBIDDEN into core's > open_htaccess hook function and make the hook return HTTP status and > not apr_status_t. > > What do you think? > > +1 > > > Cheers, > Stefan > > > > -- > Born in Roswell... married an alien... > http://emptyhammock.com/