You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2003/10/07 08:40:48 UTC

new PerlDefaultPortHandler

hi all...

   along with the map_to_storage hook, I noticed that there are two other 
Apache hooks that don't have Perl counterparts: ap_hook_default_port and 
ap_hook_http_method.

   here is an implementation for the PerlDefaultPortHandler.  unlike other 
hooks, this one doesn't enter the request cycle by default - it's called 
when ap_default_port is invoked (such as with ap_get_server_port, depending 
on your server settings), giving modules a chance to alter the default port 
via a callback.  the only example I can find is in mod_ssl, where the hook 
is used to reflect 443 over 80 as the default port.

while it may seem inconsequential now, I can see it being important for 
protocol handlers someday (and the same with hook_http_method, however 
misnamed).  and besides, it's there in Apache so it should be there in Perl :)

   anyway, patches for PerlMapToStorageHandler and PerlHttpMethodHandler 
coming soon...

--Geoff