stas        2004/02/23 16:35:22

  Modified:    src/docs/2.0/api/Apache RequestRec.pod
  Log:
  extend on the proxyreq entry
  
  Revision  Changes    Path
  1.8       +30 -4     modperl-docs/src/docs/2.0/api/Apache/RequestRec.pod
  
  Index: RequestRec.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/RequestRec.pod,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- RequestRec.pod    15 Jan 2004 01:08:12 -0000      1.7
  +++ RequestRec.pod    24 Feb 2004 00:35:22 -0000      1.8
  @@ -40,9 +40,8 @@
   
   =head2 C<proxyreq>
   
  -META: Autogenerated - needs to be reviewed/completed
  -
  -
  +Get and set the I<proxyrec> request record member and optionally
  +adjust other related fields.
   
     $ret = $r->proxyreq($val);
   
  @@ -50,12 +49,39 @@
   
   =item arg1: C<$r> 
(C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)
   
  -=item arg2: C<$val> (integer)
  +=item arg2 opt: C<$val> (integer)
  +
  +0, 1 or none.
   
   =item ret: C<$ret> (integer)
   
  +If C<$val> is 0 or 1, the I<proxyrec> member will be set to that value
  +and previous value will be returned.
  +
  +If C<$val> is not passed, and C<$r-E<gt>proxyreq> is not true, and the
  +proxy request is matching the current vhost (scheme, hostname and
  +port), the I<proxyrec> member will be set to 1 and that value will be
  +returned. In addition C<$r-E<gt>uri> is set to C<$r-E<gt>unparsed_uri>
  +and C<$r-E<gt>filename> is set to C<"modperl-proxy:".$r-E<gt>uri>. If
  +those conditions aren't true 0 is returned.
  +
   =back
   
  +For example to turn a normal request into a proxy request to be
  +handled on the same server in the C<PerlTransHandler> phase run:
  +
  +  my $real_url = $r->unparsed_uri;
  +  $r->proxyreq(1);
  +  $r->uri($real_url);
  +  $r->filename("proxy:$real_url");
  +  $r->handler('proxy-server');
  +
  +Also remember that if you want to turn a proxy request into a
  +non-proxy request, it's not enough to call:
  +
  +  $r->proxyreq(0);
  +
  +You need to adjust C<$r-E<gt>uri> and C<$r-E<gt>filename> as well.
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to