You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by ge...@apache.org on 2003/10/07 21:57:38 UTC

cvs commit: modperl-docs/src/docs/2.0/user/handlers intro.pod protocols.pod

geoff       2003/10/07 12:57:38

  Modified:    src/docs/2.0/user/config config.pod
               src/docs/2.0/user/handlers intro.pod protocols.pod
  Log:
  add docs for PerlDefaultPortHandler
  
  Revision  Changes    Path
  1.44      +5 -0      modperl-docs/src/docs/2.0/user/config/config.pod
  
  Index: config.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/config/config.pod,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- config.pod	23 Sep 2003 00:20:43 -0000	1.43
  +++ config.pod	7 Oct 2003 19:57:38 -0000	1.44
  @@ -709,6 +709,10 @@
   
   See C<L<PerlProcessConnectionHandler|docs::2.0::user::handlers::protocols/PerlProcessConnectionHandler>>.
   
  +=head2 C<PerlDefaultPortHandler>
  +
  +See C<L<PerlDefaultPortHandler|docs::2.0::user::handlers::protocols/PerlDefaultPortHandler>>.
  +
   
   
   
  @@ -980,6 +984,7 @@
   
     PerlPreConnectionHandler     ITERATE    SRV
     PerlProcessConnectionHandler ITERATE    SRV
  +  PerlDefaultPortHandler       ITERATE    SRV
     
     PerlPostReadRequestHandler   ITERATE    SRV
     PerlTransHandler             ITERATE    SRV
  
  
  
  1.11      +3 -0      modperl-docs/src/docs/2.0/user/handlers/intro.pod
  
  Index: intro.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/intro.pod,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- intro.pod	12 Aug 2003 18:06:05 -0000	1.10
  +++ intro.pod	7 Oct 2003 19:57:38 -0000	1.11
  @@ -99,6 +99,8 @@
   
   =item * C<L<PerlProcessConnectionHandler|docs::2.0::user::handlers::protocols/PerlProcessConnectionHandler>>
   
  +=item * C<L<PerlDefaultPortHandler|docs::2.0::user::handlers::protocols/PerlDefaultPortHandler>>
  +
   =back
   
   
  @@ -242,6 +244,7 @@
     
     PerlPreConnectionHandler     RUN_ALL
     PerlProcessConnectionHandler RUN_FIRST
  +  PerlDefaultPortHandler       RUN_FIRST
     
     PerlPostReadRequestHandler   RUN_ALL
     PerlTransHandler             RUN_FIRST
  
  
  
  1.10      +23 -0     modperl-docs/src/docs/2.0/user/handlers/protocols.pod
  
  Index: protocols.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/handlers/protocols.pod,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- protocols.pod	18 Jul 2003 10:42:48 -0000	1.9
  +++ protocols.pod	7 Oct 2003 19:57:38 -0000	1.10
  @@ -168,6 +168,29 @@
         return Apache::OK;
     }
   
  +=head2 PerlDefaultPortHandler
  +
  +Related to both the I<PerlProcessConnectionHandler> and the
  +I<PerlPreConnectionHandler> is the I<PerlDefaultPortHandler>,
  +whose sole purpose is to return an integer corresponding to the
  +default port for the protocol in question.  The default port
  +will be used internally by Apache when generating self-referential
  +URLs and the port cannot be determined by other means (such as the
  +I<ServerName> or I<Host> header, or when I<UseCanonicalName> is
  +set to I<Off>).
  +
  +The I<PerlDefaultPortHandler> callback is not part of the request
  +cycle, and instead is called on demand whenever port related
  +API calls (such as I<get_server_port()>) fall through to the 
  +default.
  +
  +This hook is of type
  +C<L<RUN_FIRST|docs::2.0::user::handlers::intro/item_RUN_FIRST>>.
  +
  +Similar to the other protocol handlers, the I<PerlDefaultPortHandler>'s
  +configuration scope is
  +C<L<SRV|docs::2.0::user::config::config/item_SRV>>.
  +
   
   
   Now let's look at the following two examples of connection
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Re: cvs commit: modperl-docs/src/docs/2.0/user/handlers intro.pod protocols.pod

Posted by Stas Bekman <st...@stason.org>.
geoff@apache.org wrote:

>   +=head2 PerlDefaultPortHandler
>   +
>   +Related to both the I<PerlProcessConnectionHandler> and the
>   +I<PerlPreConnectionHandler> is the I<PerlDefaultPortHandler>,
>   +whose sole purpose is to return an integer corresponding to the
>   +default port for the protocol in question.  The default port
>   +will be used internally by Apache when generating self-referential
>   +URLs and the port cannot be determined by other means (such as the
>   +I<ServerName> or I<Host> header, or when I<UseCanonicalName> is
>   +set to I<Off>).
>   +
>   +The I<PerlDefaultPortHandler> callback is not part of the request
>   +cycle, and instead is called on demand whenever port related
>   +API calls (such as I<get_server_port()>) fall through to the 
>   +default.

Any examples? I'm not so clear on why do I want to use it. Thanks.

Also since this is a generic protocols chapter, you need to explicitly say 
'HTTP request cycle' when you talk about HTTP requests, and not just 'request 
cycle', since protocols aren't necessarily HTTP. Same get_server_port is an 
HTTP method, so probably using $r->get_server_port won't confuse readers that 
will try to use that method outside the HTTP protocol. self-referential URLs 
in non-HTTP protocols?

Therefore I'd suggest to have an HTTP-specific para:

   For example if inside HTTP protocol ...

and perhaps give other ideas on how this is useful outside HTTP. If it has the 
use only in HTTP, may be it should belong to that chapter then?

Also a xref from get_server_port's entry in 2.0/api/Apache/RequestUtil.pod 
would be handy.

Thanks
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org