[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Sat, 16 May 2009 01:19:37 -0000


raeburn		Sat May 16 01:19:37 2009 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Move check for undefined spareserver to lonnet.pm (this is how lonnet.pm pre-1.784  (9/28/2006) used to behave).
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.120 loncom/auth/lonlogin.pm:1.121
--- loncom/auth/lonlogin.pm:1.120	Thu May 14 10:21:10 2009
+++ loncom/auth/lonlogin.pm	Sat May 16 01:19:29 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.120 2009/05/14 10:21:10 foxr Exp $
+# $Id: lonlogin.pm,v 1.121 2009/05/16 01:19:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -344,10 +344,6 @@
 #  then just us a relative link to authenticate:
 #
 
-if ($otherserver eq "http://") {
-    $otherserver="";
-}
-
 $r->print(<<ENDSERVERFORM);
 <form name="server" action="$otherserver/adm/authenticate" method="post" target="_top">
    <input type="hidden" name="logtoken" value="$logtoken" />
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1000 loncom/lonnet/perl/lonnet.pm:1.1001
--- loncom/lonnet/perl/lonnet.pm:1.1000	Wed May 13 01:30:49 2009
+++ loncom/lonnet/perl/lonnet.pm	Sat May 16 01:19:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1000 2009/05/13 01:30:49 raeburn Exp $
+# $Id: lonnet.pm,v 1.1001 2009/05/16 01:19:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -718,7 +718,12 @@
         if ($protocol{$spare_server} eq 'https') {
             $protocol = $protocol{$spare_server};
         }
-	$spare_server = $protocol.'://'.&hostname($spare_server);
+        if (defined($spare_server)) {
+            my $hostname = &hostname($spare_server);
+            if (defined($hostname)) {  
+	        $spare_server = $protocol.'://'.$hostname;
+            }
+        }
     }
     return $spare_server;
 }