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

foxr foxr@source.lon-capa.org
Thu, 14 May 2009 10:21:10 -0000


foxr		Thu May 14 10:21:10 2009 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  There seem to be circumstances when $otherserver can wind up containing
  http://  in that case map it to an empty string so that the login form
  action becomes a relative link on the current server.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.119 loncom/auth/lonlogin.pm:1.120
--- loncom/auth/lonlogin.pm:1.119	Tue Apr 28 21:54:51 2009
+++ loncom/auth/lonlogin.pm	Thu May 14 10:21:10 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.119 2009/04/28 21:54:51 tempelho Exp $
+# $Id: lonlogin.pm,v 1.120 2009/05/14 10:21:10 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -339,6 +339,15 @@
 $r->print(
 	  '<div class="LC_loginpage_container">');
 
+#
+#  If the loadbalancing yielded just http:// because perhaps there's no loadbalancing?
+#  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" />