httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: windows build & handler hook
Date Tue, 09 Jan 2001 00:06:33 GMT
Doug MacEachern wrote:
> 
> On Mon, 8 Jan 2001, Ben Laurie wrote:
> 
> > This is wrong - for starters, it was "*/*" and, secondly, if you want to
> > match *s, you have to use ap_strcmp_match() (err, or something like
> > that).
> 
> ap_strcmp_match is wrong too.  your comment in http_core.c is right about
> causing problems:
> 
>     /*
>      * The old way of doing handlers meant that this handler would
>      * match literally anything - this way will require handler to
>      * have a / in the middle, which probably captures the original
>      * intent, but may cause problems at first - Ben 7th Jan 01
>      */
>     if(strcmp(r->handler,"default-handler")
>        && ap_strcmp_match(r->handler,"*/*"))
>         return DECLINED;
> 
> if i have a <Location ...> with SetHandler modperl, and the handler
> returns DECLINED for a file (e.g. /location/foo.css), the match will fail
> (no /) and SERVER_ERROR will result.

Errr, yes. And what is wrong with this? Seems to me that you are relying
on buggy behaviour! Clearly the intent of:

    if (result == DECLINED && r->handler && r->filename) {
        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, r,
            "handler \"%s\" not found for: %s", r->handler,
r->filename);
    }

is that handlers _should_ fail if they are declined. What I can't quite
figure out is how this ever got triggered at all...

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message