version 1.115, 2018/11/24 16:19:09
|
version 1.116, 2018/12/22 20:05:16
|
Line 34 use lib '/home/httpd/lib/perl/';
|
Line 34 use lib '/home/httpd/lib/perl/';
|
use LONCAPA::Configuration; |
use LONCAPA::Configuration; |
use LONCAPA::Checksumming; |
use LONCAPA::Checksumming; |
use LONCAPA; |
use LONCAPA; |
|
use LONCAPA::LWPReq; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
|
|
Line 1123 sub get_domain_config {
|
Line 1124 sub get_domain_config {
|
unless ($protocol eq 'https') { |
unless ($protocol eq 'https') { |
$protocol = 'http'; |
$protocol = 'http'; |
} |
} |
$url = $protocol.'://'.$hostname.'/cgi-bin/listdomconfig.pl'; |
$url = $protocol.'://'.$hostname.'/cgi-bin/listdomconfig.pl?primary='.$primlibserv.'&format=raw'; |
} |
} |
if ($isprimary) { |
if ($isprimary) { |
my $lonusersdir = $perlvar{'lonUsersDir'}; |
my $lonusersdir = $perlvar{'lonUsersDir'}; |
Line 1144 sub get_domain_config {
|
Line 1145 sub get_domain_config {
|
} |
} |
} |
} |
} else { |
} else { |
if (open(PIPE,"wget --no-check-certificate '$url?primary=$primlibserv&format=raw' |")) { |
my $request=new HTTP::Request('GET',$url); |
my $config = ''; |
my $response=&LONCAPA::LWPReq::makerequest($primlibserv,$request,'',\%perlvar,5); |
while (<PIPE>) { |
unless ($response->is_error()) { |
$config .= $_; |
my $content = $response->content; |
} |
if ($content) { |
close(PIPE); |
my @pairs=split(/\&/,$content); |
if ($config) { |
|
my @pairs=split(/\&/,$config); |
|
foreach my $item (@pairs) { |
foreach my $item (@pairs) { |
my ($key,$value)=split(/=/,$item,2); |
my ($key,$value)=split(/=/,$item,2); |
my $what = &LONCAPA::unescape($key); |
my $what = &LONCAPA::unescape($key); |