Re: question on sub-requests

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 11/14/2012 02:48 PM, André Warnier wrote:
> I my particular case, the sendfile() solution above works fine, because
> I am sure in this case that no additional processing needs to take place
> on those static pages.

What I meant in particular was the HTTP code 304 generation. With your
solution the browser will always get a fresh copy even if the cache is
still valid.

> About returning DECLINED in a ResponseHandler : that works fine, and
> apparently has the effect of Apache serving the resource using it's
> default handler (or, I suppose, any other alternative response handler
> that may be chained).  This is consistent with the fact that a response
> handler is of type
> 
> quote
> RUN_FIRST

That's why I thought returning DECLINED should work. If you want to
switch to dedicated handler other than the default one I think you can
set it via $r->handler(newhandler). But in this case you have to hope
that the new handler is further down the handler chain. Modperl
registers its 2 response handlers with APR_HOOK_MIDDLE. So, it may
depend on the LoadModule order whether the modperl handler comes first
or newhandler.

Torsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.