Diff for /loncom/auth/lonacc.pm between versions 1.159.2.8.2.6 and 1.159.2.8.2.7

version 1.159.2.8.2.6, 2020/10/06 19:36:07 version 1.159.2.8.2.7, 2020/10/26 01:19:53
Line 572  sub handler { Line 572  sub handler {
         if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) {          if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) {
             $checkexempt = 1;              $checkexempt = 1;
         }          }
         unless ($checkexempt) {          unless (($checkexempt) || (($requrl eq '/adm/switchserver') && (!$r->is_initial_req()))) {
             ($is_balancer,$otherserver) =              ($is_balancer,$otherserver) =
                 &Apache::lonnet::check_loadbalancing($env{'user.name'},                  &Apache::lonnet::check_loadbalancing($env{'user.name'},
                                                      $env{'user.domain'});                                                       $env{'user.domain'});
             if ($is_balancer) {              if ($is_balancer) {
                 unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) {                  # Check if browser sent a LON-CAPA load balancer cookie (and this is a balancer)
                     # Check if browser sent a LON-CAPA load balancer cookie (and this is a balancer)                  my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r);
                     my ($found_server,$balancer_cookie) = &Apache::lonnet::check_for_balancer_cookie($r);                  if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) {
                     if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) {                      $otherserver = $found_server;
                         $otherserver = $found_server;                  }
                     }                  unless ($requrl eq '/adm/switchserver') {
                       $r->set_handlers('PerlResponseHandler'=>
                                        [\&Apache::switchserver::handler]);
                 }                  }
             }  
         }  
         if ($is_balancer) {  
             unless (($requrl eq '/adm/switchserver') && (!$r->is_initial_req())) {  
                 $r->set_handlers('PerlResponseHandler'=>  
                                  [\&Apache::switchserver::handler]);  
                 if ($otherserver ne '') {                  if ($otherserver ne '') {
                     $env{'form.otherserver'} = $otherserver;                      $env{'form.otherserver'} = $otherserver;
                 }                  }
             }                  unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||
             unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') ||                          ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {
                     ($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) {                      $env{'form.origurl'} = $r->uri;
                 $env{'form.origurl'} = $r->uri;                  }
             }              }
         }          }
         if ($requrl=~m{^/+tiny/+$match_domain/+\w+$}) {          if ($requrl=~m{^/+tiny/+$match_domain/+\w+$}) {

Removed from v.1.159.2.8.2.6  
changed lines
  Added in v.1.159.2.8.2.7


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