Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.941.2.1 and 1.942

version 1.941.2.1, 2008/03/27 12:51:56 version 1.942, 2008/02/21 10:04:35
Line 1656  sub absolute_url { Line 1656  sub absolute_url {
 #  fn     Possibly encrypted resource name/id.  #  fn     Possibly encrypted resource name/id.
 #  form   Hash that describes how the rendering should be done  #  form   Hash that describes how the rendering should be done
 #         and other things.  #         and other things.
 # Returns:  #  r      Optional reference that will be given the response.
 #   Scalar context: The content of the response.  #         This is mostly provided so that the caller can implement
 #   Array context:  2 element list of the content and the full response object.  #         error detection, recovery and retry policies.
 #       #     
   # Returns:
   #    The content of the response.
 sub ssi {  sub ssi {
   
     my ($fn,%form)=@_;      my ($fn,%form, $r)=@_;
   
     my $ua=new LWP::UserAgent;      my $ua=new LWP::UserAgent;
       
     my $request;      my $request;
   
     $form{'no_update_last_known'}=1;      $form{'no_update_last_known'}=1;
Line 1678  sub ssi { Line 1682  sub ssi {
     $request->header(Cookie => $ENV{'HTTP_COOKIE'});      $request->header(Cookie => $ENV{'HTTP_COOKIE'});
     my $response=$ua->request($request);      my $response=$ua->request($request);
   
     if (wantarray) {      if ($r) {
  return ($response->content, $response);   $$r = $response;
     } else {  
  return $response->content;  
     }      }
   
       return $response->content;
 }  }
   
 sub externalssi {  sub externalssi {

Removed from v.1.941.2.1  
changed lines
  Added in v.1.942


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>