--- loncom/lond 2000/06/29 20:43:03 1.13
+++ loncom/lond 2000/07/17 21:36:33 1.17
@@ -7,7 +7,7 @@
# 12/7,12/15,01/06,01/11,01/12,01/14,2/8,
# 03/07,05/31 Gerd Kortemeyer
# 06/26 Scott Harrison
-# 06/29 Gerd Kortemeyer
+# 06/29,06/30,07/14,07/15,07/17 Gerd Kortemeyer
#
# based on "Perl Cookbook" ISBN 1-56592-243-3
# preforker - server who forks first
@@ -217,7 +217,7 @@ sub propath {
my ($udom,$uname)=@_;
$udom=~s/\W//g;
$uname=~s/\W//g;
- my $subdir=$uname;
+ my $subdir=$uname.'__';
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/;
my $proname="$perlvar{'lonUsersDir'}/$udom/$subdir/$uname";
return $proname;
@@ -333,15 +333,18 @@ sub make_new_child {
} else {
&logthis(
"WARNING: $clientip did not reply challenge");
+ print $client "bye\n";
}
} else {
&logthis(
"WARNING: "
."$clientip failed to initialize: >$remotereq< ");
+ print $client "bye\n";
}
} else {
&logthis(
"WARNING: Unknown client $clientip");
+ print $client "bye\n";
}
if ($clientok) {
# ---------------- New known client connecting, could mean machine online again
@@ -513,6 +516,15 @@ sub make_new_child {
&logthis(
"LWP GET: $message for $fname ($remoteurl)");
} else {
+ if ($remoteurl!~/\.meta$/) {
+ my $mrequest=
+ new HTTP::Request('GET',$remoteurl.'.meta');
+ my $mresponse=
+ $ua->request($mrequest,$fname.'.meta');
+ if ($mresponse->is_error()) {
+ unlink($fname.'.meta');
+ }
+ }
rename($transname,$fname);
}
}
@@ -952,6 +964,7 @@ sub make_new_child {
} else {
$ulsout='no_such_dir';
}
+ if ($ulsout eq '') { $ulsout='empty'; }
print $client "$ulsout\n";
# ------------------------------------------------------------- unknown command
} else {