[LON-CAPA-cvs] cvs: loncom / lonhttpd /auth lonlogin.pm /html/res/adm/pages menu.html /interface loncommon.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 29 Oct 2002 20:57:32 -0000


www		Tue Oct 29 15:57:32 2002 EDT

  Modified files:              
    /loncom	lonhttpd 
    /loncom/auth	lonlogin.pm 
    /loncom/html/res/adm/pages	menu.html 
    /loncom/interface	loncommon.pm 
  Log:
  Get small GIFs from lonhttpd
  
  
Index: loncom/lonhttpd
diff -u loncom/lonhttpd:1.1 loncom/lonhttpd:1.2
--- loncom/lonhttpd:1.1	Tue Oct 29 15:21:32 2002
+++ loncom/lonhttpd	Tue Oct 29 15:57:31 2002
@@ -4,12 +4,12 @@
 # based on
 # TinyHTTPD - a minimum-functional HTTP server written in -*- Perl -*-
 # -ot.0894
-# $Id: lonhttpd,v 1.1 2002/10/29 20:21:32 www Exp $
+# $Id: lonhttpd,v 1.2 2002/10/29 20:57:31 www Exp $
 
 # Currently supported: HTTP 1.0/1.1 GET and POST queries
 # File types of .html and .gif
 
-$ENV{'SERVER_SOFTWARE'}="TinyHTTPD $Revision: 1.1 $ -ot.0894 (LON-CAPA)";
+$ENV{'SERVER_SOFTWARE'}="TinyHTTPD $Revision: 1.2 $ -ot.0894 (LON-CAPA)";
 
 
 use POSIX;
@@ -107,6 +107,9 @@
 
     # prevent directory go-back
     $url=~/\.\./ && do { &error(403,$url,"contains go-back"); return; };
+
+   # Multiple slashes do happen 
+   $url=~s/\/+/\//g;
 
     # Check access control
     unless (($url=~/^\/res\/adm\//) || ($url=~/^\/adm\//)) {
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.25 loncom/auth/lonlogin.pm:1.26
--- loncom/auth/lonlogin.pm:1.25	Mon Oct 14 12:14:58 2002
+++ loncom/auth/lonlogin.pm	Tue Oct 29 15:57:31 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.25 2002/10/14 16:14:58 bowersj2 Exp $
+# $Id: lonlogin.pm,v 1.26 2002/10/29 20:57:31 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,8 @@
 
     my $fullgraph=($ENV{'form.interface'} ne 'textual');
 
-    my $iconpath= $r->dir_config('lonIconsURL');
+    my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':8080'.
+                  $r->dir_config('lonIconsURL');
     my $domain  = $r->dir_config('lonDefDomain');
     my $role    = $r->dir_config('lonRole');
     my $loadlim = $r->dir_config('lonLoadLim');
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.72 loncom/html/res/adm/pages/menu.html:1.73
--- loncom/html/res/adm/pages/menu.html:1.72	Fri Oct 25 10:04:42 2002
+++ loncom/html/res/adm/pages/menu.html	Tue Oct 29 15:57:31 2002
@@ -4,7 +4,7 @@
 Remote Control
 
 //
-// $Id: menu.html,v 1.72 2002/10/25 14:04:42 www Exp $
+// $Id: menu.html,v 1.73 2002/10/29 20:57:31 www Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -47,8 +47,8 @@
 var dislocked = 1;
 var statuslocked = 0;
 
-var imgpath='/res/adm/pages/';
-var fontpath='/adm/lonLCDfont/';
+var imgpath=':8080/res/adm/pages/';
+var fontpath=':8080/adm/lonLCDfont/';
 var currentURL='';
 var reloadURL='';
 var currentSymb='';
@@ -191,7 +191,7 @@
          if (ch==':') { ch='colon'; }
          if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
-      this.document['i'+i].src=fontpath+ch+'.gif';
+      this.document['i'+i].src="http://"+clienthost+fontpath+ch+'.gif';
    }
    for (i=0;i<=7;i++) {
       if (i<ltext.length) {
@@ -201,7 +201,7 @@
          if (ch==':') { ch='colon'; }
          if (ch=='/') { ch='slash'; }
       } else { ch='space'; }
-      this.document['j'+i].src=fontpath+ch+'.gif';
+      this.document['j'+i].src="http://"+clienthost+fontpath+ch+'.gif';
    }
   }
 }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.70 loncom/interface/loncommon.pm:1.71
--- loncom/interface/loncommon.pm:1.70	Fri Oct 18 09:49:49 2002
+++ loncom/interface/loncommon.pm	Tue Oct 29 15:57:31 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.70 2002/10/18 13:49:49 www Exp $
+# $Id: loncommon.pm,v 1.71 2002/10/29 20:57:31 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1299,7 +1299,8 @@
     my $domain = &determinedomain(shift);    
      # See if there is a logo
     if (-e '/home/httpd/html/adm/lonDomLogos/'.$domain.'.gif') {
-        return '<img src="/adm/lonDomLogos/'.$domain.'.gif" />';
+        return '<img src="http://'.$ENV{'HTTP_HOST'}.':8080/adm/lonDomLogos/'.
+               $domain.'.gif" />';
     } elsif(exists($Apache::lonnet::domaindescription{$domain})) {
         return $Apache::lonnet::domaindescription{$domain};
     } else {
@@ -1403,7 +1404,7 @@
 $bodytag
 <table width="100%" cellspacing="0" border="0" cellpadding="0">
 <tr><td bgcolor="$font">
-<img src="$img" /></td>
+<img src="http://$ENV{'HTTP_HOST'}:8080/$img" /></td>
 <td bgcolor="$font"><font color='$sidebg'>$messages</font></td>
 </tr>
 <tr>