httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Thoughts on a 2.0 API (fwd)
Date Thu, 12 Jun 1997 07:31:21 GMT
[Brian's original message is probably in the other Brian's box waiting
approval...]

This can probably happen for free if we pursue our ideas of stackable i/o
filters (for mod_include, chunking, compressing, encrypting).  I wouldn't
go quite as far as to say we should embed apache in perl though ;)

Dean

On Wed, 11 Jun 1997, Brian Slesinsky wrote:

> 
> As a true Perl weenie, I was thinking if you put an XS wrapper around each
> Apache module and the main loop, you could embed Apache in Perl rather
> than the other way around. 
> 
> The configuration file might look like this:
> 
> #!/usr/local/bin/perl -wT
> use Apache::Server;
> use Apache::mod::mime;
> use Apache::mod::access;
> use Apache::mod::auth;
> # [...]
> Apache::Server->new->run;
> 
> That way I could call Apache::mod::include from any Perl script.
> 
> The overhead would depend on how fast one XS module can call another
> using Perl's calling conventions.
> 
> Just a thought :-)
> 
> _____________________________________________________________________
> Brian Slesinsky                           This is my default tagline.
> 
> On Wed, 11 Jun 1997, Dean Gaudet wrote:
> 
> > perl weenies might appreciate this.
> > 
> > Dean
> > 
> > ---------- Forwarded message ----------
> > Date: Tue, 10 Jun 1997 22:14:01 -0400
> > From: Doug MacEachern <dougm@opengroup.org>
> > Reply-To: new-httpd@apache.org
> > To: new-httpd@apache.org
> > Subject: Re: Thoughts on a 2.0 API 
> > 
> > > 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>
> > 
> > Of course, this doesn't need to be in the config file, the subroutine
> > can be defined in a file, config would just be something like:
> > 
> > PerlTransHandler  My::translate
> > 
> > -Doug
> > 
> > > 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