version 1.78, 2006/08/18 20:24:53
|
version 1.81, 2006/09/28 00:59:02
|
Line 41 use lib '/home/httpd/lib/perl/';
|
Line 41 use lib '/home/httpd/lib/perl/';
|
use LONCAPA; |
use LONCAPA; |
|
|
|
|
|
sub additional_machine_domains { |
|
my @domains; |
|
open(my $fh,"<".$Apache::lonnet::perlvar{'lonTabDir'}.'/expected_domains.tab'); |
|
while( my $line = <$fh>) { |
|
$line =~ s/\s//g; |
|
push(@domains,$line); |
|
} |
|
return @domains; |
|
} |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
|
&Apache::loncommon::get_unprocessed_cgi |
&Apache::loncommon::get_unprocessed_cgi |
($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'}, |
(join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'}, |
|
$ENV{'REDIRECT_QUERY_STRING'}), |
['interface','username','domain','firsturl','localpath','localres', |
['interface','username','domain','firsturl','localpath','localres', |
'token']); |
'token']); |
|
|
Line 129 ENDFAILED
|
Line 140 ENDFAILED
|
$r->dir_config('lonIconsURL'); |
$r->dir_config('lonIconsURL'); |
my $domain = $r->dir_config('lonDefDomain'); |
my $domain = $r->dir_config('lonDefDomain'); |
my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0]; |
my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0]; |
foreach my $posdom (&Apache::lonnet::current_machine_domains()) { |
foreach my $posdom (&Apache::lonnet::current_machine_domains(), |
|
&additional_machine_domains()) { |
if (lc($posdom) eq lc($testdomain)) { $domain=$posdom; } |
if (lc($posdom) eq lc($testdomain)) { $domain=$posdom; } |
} |
} |
if (($env{'form.domain'}) && |
if (($env{'form.domain'}) && |
Line 163 ENDFAILED
|
Line 175 ENDFAILED
|
my $userloadpercent=&Apache::lonnet::userload(); |
my $userloadpercent=&Apache::lonnet::userload(); |
|
|
# ------------------------------------------------------- Do the load balancing |
# ------------------------------------------------------- Do the load balancing |
my $otherserver= &Apache::loncommon::absolute_url($host_name); |
my $otherserver= &Apache::lonnet::absolute_url($host_name); |
my $firsturl= |
my $firsturl= |
($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'}); |
($env{'request.firsturl'}?$env{'request.firsturl'}:$env{'form.firsturl'}); |
# ---------------------------------------- Are we access server and overloaded? |
# ---------------------------------------- Are we access server and overloaded? |