Diff for /loncom/lontrans.pm between versions 1.22 and 1.24

version 1.22, 2018/04/21 20:34:44 version 1.24, 2018/07/26 19:01:25
Line 91  sub handler { Line 91  sub handler {
                                         }                                          }
                                     }                                      }
                                     my $host = $r->headers_in->get('Host');                                      my $host = $r->headers_in->get('Host');
                                     if ($host) {                                      if ($r->is_initial_req() || !$host) {
                                           $r->internal_redirect($realuri);
                                           return OK;
                                       } else {
                                         my $protocol = 'http';                                          my $protocol = 'http';
                                         if ($r->get_server_port == 443) {                                          if ($r->get_server_port == 443) {
                                             $protocol = 'https';                                              $protocol = 'https';
Line 167  sub redirect_raw { Line 170  sub redirect_raw {
                             my $remintdom = &Apache::lonnet::internet_dom($remprimary);                              my $remintdom = &Apache::lonnet::internet_dom($remprimary);
                             if (ref($replication->{'certreq'}) eq 'ARRAY') {                              if (ref($replication->{'certreq'}) eq 'ARRAY') {
                                 if (grep(/^\Q$remintdom\E$/,@{$replication->{'certreq'}})) {                                  if (grep(/^\Q$remintdom\E$/,@{$replication->{'certreq'}})) {
                                     $redirect = 1;  
                                 } else {  
                                     $redirect = 0;                                      $redirect = 0;
                                   } else {
                                       $redirect = 1;
                                 }                                  }
                             }                              }
                             if (ref($replication->{'nocertreq'}) eq 'ARRAY') {                              if (ref($replication->{'nocertreq'}) eq 'ARRAY') {
                                 if (grep(/^\Q$remintdom\E$/,@{$replication->{'nocertreq'}})) {                                  if (grep(/^\Q$remintdom\E$/,@{$replication->{'nocertreq'}})) {
                                     $redirect = 0;  
                                 } else {  
                                     $redirect = 1;                                      $redirect = 1;
                                   } else {
                                       $redirect = 0;
                                 }                                  }
                             }                              }
                         }                          }
Line 186  sub redirect_raw { Line 189  sub redirect_raw {
             last;              last;
         }          }
     }      }
     return $redirect;        return $redirect;
 }  }
   
 1;  1;

Removed from v.1.22  
changed lines
  Added in v.1.24


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