Diff for /loncom/auth/switchserver.pm between versions 1.35.2.2 and 1.35.2.4

version 1.35.2.2, 2019/08/03 23:27:39 version 1.35.2.4, 2020/10/25 02:25:27
Line 223  sub handler { Line 223  sub handler {
  return OK;   return OK;
     }      }
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
      
 # ---------------------------------------------------------------- Get handover  # ---------------------------------------------------------------- Get handover
   
     my $newcookieid;      my ($is_balancer,$setcookie,$newcookieid,$otherbalcookie);
     my $only_body = 0;      my $only_body = 0;
     my ($is_balancer,$posshost,$setcookie) =      ($is_balancer,undef,$setcookie) =
         &Apache::lonnet::check_loadbalancing($env{'user.name'},$env{'user.domain'});          &Apache::lonnet::check_loadbalancing($env{'user.name'},$env{'user.domain'},'switchserver');
     if ($is_balancer && $setcookie && $env{'form.otherserver'}) {      if ($is_balancer && $setcookie && $env{'form.otherserver'}) {
   
         # Set a balancer cookie unless browser already sent LON-CAPA load balancer          # Set a balancer cookie unless browser already sent LON-CAPA load balancer
         # cookie which points at the target server          # cookie which points at the target server
         my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r,1);          my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r,1);
Line 243  sub handler { Line 244  sub handler {
                                               $env{'user.name'},$env{'user.domain'});                                                $env{'user.name'},$env{'user.domain'});
         }          }
     }      }
       if ((!$is_balancer) && ($env{'request.balancercookie'})) {
           $otherbalcookie = $env{'request.balancercookie'};
       }
   
     my %info=('ip'       => $ENV{'REMOTE_ADDR'},      my %info=('ip'       => $ENV{'REMOTE_ADDR'},
       'domain'   => $env{'user.domain'},        'domain'   => $env{'user.domain'},
Line 252  sub handler { Line 256  sub handler {
       'balancer' => $is_balancer);        'balancer' => $is_balancer);
     if ($newcookieid) {      if ($newcookieid) {
         $info{'balcookie'} = $newcookieid;          $info{'balcookie'} = $newcookieid;
       } elsif ($otherbalcookie) {
           $info{'otherbalcookie'} = $otherbalcookie;
     }      }
     if ($env{'form.origurl'}) {      if ($env{'form.origurl'}) {
         $info{'origurl'} = $env{'form.origurl'};          $info{'origurl'} = $env{'form.origurl'};

Removed from v.1.35.2.2  
changed lines
  Added in v.1.35.2.4


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