--- loncom/loncron 2018/11/24 16:19:09 1.115 +++ loncom/loncron 2018/12/22 20:05:16 1.116 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.115 2018/11/24 16:19:09 raeburn Exp $ +# $Id: loncron,v 1.116 2018/12/22 20:05:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,6 +34,7 @@ use lib '/home/httpd/lib/perl/'; use LONCAPA::Configuration; use LONCAPA::Checksumming; use LONCAPA; +use LONCAPA::LWPReq; use Apache::lonnet; use Apache::loncommon; @@ -1123,7 +1124,7 @@ sub get_domain_config { unless ($protocol eq 'https') { $protocol = 'http'; } - $url = $protocol.'://'.$hostname.'/cgi-bin/listdomconfig.pl'; + $url = $protocol.'://'.$hostname.'/cgi-bin/listdomconfig.pl?primary='.$primlibserv.'&format=raw'; } if ($isprimary) { my $lonusersdir = $perlvar{'lonUsersDir'}; @@ -1144,14 +1145,12 @@ sub get_domain_config { } } } else { - if (open(PIPE,"wget --no-check-certificate '$url?primary=$primlibserv&format=raw' |")) { - my $config = ''; - while () { - $config .= $_; - } - close(PIPE); - if ($config) { - my @pairs=split(/\&/,$config); + my $request=new HTTP::Request('GET',$url); + my $response=&LONCAPA::LWPReq::makerequest($primlibserv,$request,'',\%perlvar,5); + unless ($response->is_error()) { + my $content = $response->content; + if ($content) { + my @pairs=split(/\&/,$content); foreach my $item (@pairs) { my ($key,$value)=split(/=/,$item,2); my $what = &LONCAPA::unescape($key);