Re: Newbie question about mod_perl capabilities

2003-07-08 Thread Matt Sergeant
On Monday, Jul 7, 2003, at 20:50 Europe/London, Ged Haywood wrote:

On 7 Jul 2003, Walter H. van Holst wrote:

 I am new to mod_perl and am trying to figure out whether it suits my
needs or not. Can I use it to intercept any http CONNECT requests 
Apache
receives and answer those?
The concept of a connection is at the transport level, way below HTTP.
The HTTP protocol simply assumes a reliable transport (you don't even
need an Internet:) and deals with exchanges of messages.  See RFC1945.
Sorry Ged, Walter is talking about CONNECT which is a proxy request. It 
goes in place of GET or POST in the request line:

CONNECT mail.openrelay.com:25 HTTP/1.1

I *think* mod_perl will be able to intercept this, but I've never tried 
it. You might need to do it very early on in the request, and make sure 
it gets passed through to mod_proxy later on or things just won't work.

Matt.



Re: Newbie question about mod_perl capabilities

2003-07-08 Thread Walter H. van Holst
On Tue, 2003-07-08 at 10:14, Matt Sergeant wrote:

 Sorry Ged, Walter is talking about CONNECT which is a proxy request. It 
 goes in place of GET or POST in the request line:
 
 CONNECT mail.openrelay.com:25 HTTP/1.1
 
 I *think* mod_perl will be able to intercept this, but I've never tried 
 it. You might need to do it very early on in the request, and make sure 
 it gets passed through to mod_proxy later on or things just won't work.

Well, thanks to a someone on IRC I have found a code snippet that might
do exactly that. So it appears that mod_perl can do this. And yes, it is
intended for exactly the kind of CONNECT requests you describe.

Regards,

 Walter
-- 
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick. It's ridiculous.
(Bill Gates)



Re: Newbie question about mod_perl capabilities

2003-07-08 Thread Ged Haywood
Hi there,

On 8 Jul 2003, Walter H. van Holst wrote:

 On Tue, 2003-07-08 at 10:14, Matt Sergeant wrote:
 
  Sorry Ged, Walter is talking about CONNECT which is a proxy request.

Argh.  :)

 Well, thanks to a someone on IRC I have found a code snippet that might
 do exactly that. So it appears that mod_perl can do this. And yes, it is
 intended for exactly the kind of CONNECT requests you describe.

:)

73,
Ged.



Newbie question about mod_perl capabilities

2003-07-07 Thread Walter H. van Holst
Hi,

 I am new to mod_perl and am trying to figure out whether it suits my
needs or not. Can I use it to intercept any http CONNECT requests Apache
receives and answer those?

Regards,

 Walter
-- 
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick. It's ridiculous.
(Bill Gates)



Re: Newbie question about mod_perl capabilities

2003-07-07 Thread Ged Haywood
Hi there,

On 7 Jul 2003, Walter H. van Holst wrote:

  I am new to mod_perl and am trying to figure out whether it suits my
 needs or not. Can I use it to intercept any http CONNECT requests Apache
 receives and answer those?

The concept of a connection is at the transport level, way below HTTP.
The HTTP protocol simply assumes a reliable transport (you don't even
need an Internet:) and deals with exchanges of messages.  See RFC1945.

Read the Eagle Book (*), for more information about where mod_perl
fits into the scheme of things.  Chapter 3 has a good explanation of
the Apache request cycle.

73,
Ged.

(*) Writing Apache Modules with Perl and C, ISBN 1-56592-567-X