httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Revisiting the pre_htaccess hook
Date Thu, 27 Jun 2013 17:28:25 GMT
Jim Jagielski <jim@jaguNET.com> schrieb:

>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 <trawick@gmail.com> wrote:
>
>> On Sun, Jun 9, 2013 at 5:57 AM, Stefan Fritsch <sf@sfritsch.de>
>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/

I won't have time in the next few days. Hopefully next week, but if someone beats me to it,
that's fine, too.

Mime
View raw message