You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Walter H. van Holst" <wa...@xs4all.nl> on 2003/07/07 19:04:30 UTC

Newbie question about mod_perl capabilities

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

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
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.


Re: Newbie question about mod_perl capabilities

Posted by "Walter H. van Holst" <wa...@xs4all.nl>.
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

Posted by Matt Sergeant <ma...@sergeant.org>.
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

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
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