httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Thoughts on a 2.0 API
Date Wed, 11 Jun 1997 06:55:54 GMT
Doug MacEachern wrote:
> 
> > it after the response (say, during the logging phase), it won't do what is
> > expected. But they can choose whether A happens first, or B. And vary it
> > according to host/port/URL.
> > 
> > In my system, there are still phases, but they are more fluid - determined
> > by the configuration. This would mean that a straight URL->file mapping, for
> > example, would do almost nothing, and run _really_ fast.
> > 
> > <Host fast.somewhere.com>
> >  <URL /(.*):path:>
> >   File /usr/local/wwwdocs/$path
> >  </URL>
> > </Host>
> 
> I might be jumping in without fully understanding the discussion (or
> the syntax), but this is already quite simple with Perl:
> 
> #httpd.conf
> <Perl>
> #push a handler to step in at the translate stage
> push @PerlTransHandler, sub {
>      my $r = shift;
>      my $host = $r->get_remote_host;
> 
>      if($host =~ /^fast.somewhere.com$/) {
>         if($r->uri =~ /(.*)/) {
>            $r->filename("/usr/local/wwwdocs/$1");
>            return OK;
>         }
>      }        
>      return DECLINED;
> };
> </Perl>

Yes, but in this case all the phases still occur. There's no way, as I
understand it, to influence the order of the phases, or the module execution
order, even from Perl, right?

Cheers,

Ben.

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message