httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: protocol module ?
Date Thu, 08 Feb 2007 18:55:22 GMT
All hooks may see any connection (likewise, with other hooks).  The trick
is how to 'go away' and ignore/decline handling it.

mod_ftp looks for a server's FTP On directive setting in the server host
context to decide to pick up and handle the connection.  Since vhosts
can be configured for VirtualHost _default_:port or VirtualHost IP:port,
this is pretty trivial to unwind if the user places their protocol
related directive in the proper context.  See mod_echo for an example.



Gregory Nicholls wrote:
>  I've been looking at mod-ftpd and mod-pop3 with a view to writing a
> protocol module. What I haven't been able to work out from reading
> these, is how a particular protocol module 'registers' its interest in
> specific connections.
> eg. Assume there's 2 protocols being used and we have Listen 8080 http
> and Listen 1234 foo. I use ap_hook_process_connection to insert mod_foo
> into the chain. So far so good but I only want to process connections
> coming on port 1234. Neither mod-ftpd or mod-pop3 seem to have any code
> that examines the connection with a view to declining those they can't
> process. So I'm guessing that there's some mechanism for assigning
> protocols/ports to a specific module. I just don't know how to do it.
>       Can some kind soul point out what I've missed please ?
>          Thanks,
>             Gregory Nicholls
> 
> .
> 


Mime
View raw message