[LON-CAPA-cvs] cvs: loncom(version_2_10_X) / lond

raeburn raeburn at source.lon-capa.org
Thu Jul 28 15:42:18 EDT 2011


raeburn		Thu Jul 28 19:42:18 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom	lond 
  Log:
  - Backport 1.476.
  
  
Index: loncom/lond
diff -u loncom/lond:1.467.2.4 loncom/lond:1.467.2.5
--- loncom/lond:1.467.2.4	Sun Jun 12 00:08:01 2011
+++ loncom/lond	Thu Jul 28 19:42:18 2011
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.467.2.4 2011/06/12 00:08:01 raeburn Exp $
+# $Id: lond,v 1.467.2.5 2011/07/28 19:42:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.467.2.4 $'; #' stupid emacs
+my $VERSION='$Revision: 1.467.2.5 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -2278,7 +2278,9 @@
 
 	my $destname=$udir.'/'.$ufile;
 	my $transname=$udir.'/'.$ufile.'.in.transit';
-	my $remoteurl='http://'.$clientip.'/userfiles/'.$fname;
+        my $clientprotocol=$Apache::lonnet::protocol{$clientname};
+        $clientprotocol = 'http' if ($clientprotocol ne 'https');
+	my $remoteurl=$clientprotocol.'://'.$clientip.'/userfiles/'.$fname;
 	my $response;
 	Debug("Remote URL : $remoteurl Transfername $transname Destname: $destname");
 	alarm(120);
@@ -7167,7 +7169,9 @@
                 # the metadata
 		unless ($fname=~/\.meta$/) { &unsub("$fname.meta",$clientip); }
 		$fname=~s/\/home\/httpd\/html\/res/raw/;
-		$fname="http://".&Apache::lonnet::hostname($perlvar{'lonHostID'})."/".$fname;
+                my $protocol = $Apache::lonnet::protocol{$perlvar{'lonHostID'}};
+                $protocol = 'http' if ($protocol ne 'https');
+		$fname=$protocol.'://'.&Apache::lonnet::hostname($perlvar{'lonHostID'})."/".$fname;
 		$result="$fname\n";
 	    }
 	} else {




More information about the LON-CAPA-cvs mailing list