httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: windows build & handler hook
Date Tue, 09 Jan 2001 17:53:20 GMT
On Tue, 9 Jan 2001, Ben Laurie wrote:
 
> Actually, I don't think I object too much to setting r->handler. What I
> do mind is setting it to */*! At least set it to a real type/handler
> name. For example "default-handler" would be a sensible choice,
> possibly, even better would be the content type if available.
> 
> After all, if you are going to punt, you should surely make sure you
> punt to the right guy, right?

yeah, setting to r->content_type is much better.  btw, i never said
i was happy with using '*/*', i just said it worked.  i had hoped for a
more useful suggestion than 'Vomit!', like this one :)
 
> BTW, I hope this behaviour is documented - when I set a handler, I
> rather expect it to stay set and not go around serving up stuff using
> other handlers at its whim.

look closer at what's happening here:

<Location /foo>
   SetHandler modperl
   PerlHandler Apache::Foo
</Location>

first, with the current code, modperl_response_handler() is call for every
request, but returns DECLINED unless r->handler == "modperl".

Apache::Foo::handler() gets called for everything inside /foo.
it pulls all sorts of stunts, generating .html from .pod, syntax
highlighting .pm and .pl files, whatever, but punts (return DECLINED) on
things like .gif and .css files.

so with the change you made, returning DECLINED for a .gif or .css in
that location now results in SERVER_ERROR.

don't tell me that things in /foo should point outside that location for
these files or that i should have additional <Files *.{gif,css}> type
configuration.

setting r->handler = r->content_type; in this case works well, much like
having an 'UnsetHandler modperl' directive.


Mime
View raw message