You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Reid <ab...@dial.pipex.com> on 1999/09/09 22:49:39 UTC

mod_mmap_static

Hi all,

I've been trying to get this module to work with -2.0.  (Yeah I know it's a
hack and still experimental)  The big problem I've run into is that I can't
see a way of replacing the call

core_module.translate_handler

with something that will get the filename for the request without doing a
lot of other things, which is what this module tries to avoid doing.  I've
tried fiddling with the position of the hook it uses but it's made no
difference.  If I simply ignore the translate_hook then it still works but
you don't anywhere near the same benefit.  Any ideas?  Is there another hook
that I could use or is another hook required?  Or is it simply a case of me
not having dug enough into this?

david



Re: mod_mmap_static

Posted by David Reid <ab...@dial.pipex.com>.
Sorry Ben.

Thought of those..but the core module is defined as HOOK_REALLY_LAST.  I did
try setting the value of the hook to 31 (HOOK_REALLY_LAST is 30) but it
didn't get called - guess the max is 30?

Setting it to anything else results in the translator being called with no
filename so it dies and returns a 404.  What's needed for the module is a
way of getting the filename before the stat has been called, so it saves the
stat call and uses it's stored value.  Exactly where that point is I'll
leave to you to figure out :-)

david
----- Original Message -----
From: Ben Laurie <be...@algroup.co.uk>
To: <ne...@apache.org>
Sent: 09 September 1999 23:04
Subject: Re: mod_mmap_static


> Dean Gaudet wrote:
> >
> > just to add to this -- i'm pretty sure that mod_mmap_static wants
another
> > phase after the filename has been selected... and it may already be
> > possible to do this with ben's topological sorting, but i haven't looked
> > at it.  i think it's similar to some problems which mod_rewrite has.
(i'm
> > too busy to think it through again, hoping someone else will :)
>
> Oh boy. Back to me again, eh? Well, you could use topological sort to
> ensure that mod_mmap_static ran after the modules of your choice. Or you
> could just ask for it to run last. Would either of those do the trick?
>
> Cheers,
>
> Ben.
>
> --
> http://www.apache-ssl.org/ben.html
>
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
>      - Indira Gandhi


Re: mod_mmap_static

Posted by Dean Gaudet <dg...@arctic.org>.

On Thu, 9 Sep 1999, Ben Laurie wrote:

> Dean Gaudet wrote:
> > 
> > just to add to this -- i'm pretty sure that mod_mmap_static wants another
> > phase after the filename has been selected... and it may already be
> > possible to do this with ben's topological sorting, but i haven't looked
> > at it.  i think it's similar to some problems which mod_rewrite has.  (i'm
> > too busy to think it through again, hoping someone else will :)
> 
> Oh boy. Back to me again, eh? Well, you could use topological sort to
> ensure that mod_mmap_static ran after the modules of your choice. Or you
> could just ask for it to run last. Would either of those do the trick?

yeah, if mod_mmap_static's translate phase runs last it would work... it
just needs the core to go before it.

Dean


Re: mod_mmap_static

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> just to add to this -- i'm pretty sure that mod_mmap_static wants another
> phase after the filename has been selected... and it may already be
> possible to do this with ben's topological sorting, but i haven't looked
> at it.  i think it's similar to some problems which mod_rewrite has.  (i'm
> too busy to think it through again, hoping someone else will :)

Oh boy. Back to me again, eh? Well, you could use topological sort to
ensure that mod_mmap_static ran after the modules of your choice. Or you
could just ask for it to run last. Would either of those do the trick?

Cheers,

Ben.

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

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Re: mod_mmap_static

Posted by Dean Gaudet <dg...@arctic.org>.
just to add to this -- i'm pretty sure that mod_mmap_static wants another
phase after the filename has been selected... and it may already be
possible to do this with ben's topological sorting, but i haven't looked
at it.  i think it's similar to some problems which mod_rewrite has.  (i'm
too busy to think it through again, hoping someone else will :) 

Dean

On Thu, 9 Sep 1999, David Reid wrote:

> Hi all,
> 
> I've been trying to get this module to work with -2.0.  (Yeah I know it's a
> hack and still experimental)  The big problem I've run into is that I can't
> see a way of replacing the call
> 
> core_module.translate_handler
> 
> with something that will get the filename for the request without doing a
> lot of other things, which is what this module tries to avoid doing.  I've
> tried fiddling with the position of the hook it uses but it's made no
> difference.  If I simply ignore the translate_hook then it still works but
> you don't anywhere near the same benefit.  Any ideas?  Is there another hook
> that I could use or is another hook required?  Or is it simply a case of me
> not having dug enough into this?
> 
> david
> 
> 
>