[LON-CAPA-cvs] cvs: loncom / lonhttpd

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Fri, 13 Apr 2007 15:43:43 -0000


raeburn		Fri Apr 13 11:43:43 2007 EDT

  Modified files:              
    /loncom	lonhttpd 
  Log:
  Eliminate dependency on lonnet
  Replace check for known domain with reg exp check for valid characters.
  
  
Index: loncom/lonhttpd
diff -u loncom/lonhttpd:1.13 loncom/lonhttpd:1.14
--- loncom/lonhttpd:1.13	Wed Apr 11 17:37:24 2007
+++ loncom/lonhttpd	Fri Apr 13 11:43:42 2007
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: lonhttpd,v 1.13 2007/04/11 21:37:24 raeburn Exp $
+# $Id: lonhttpd,v 1.14 2007/04/13 15:43:42 raeburn Exp $
 
 $VERSION = "1.3.2 (Demonic/Linux/LON-CAPA Derivative $Revison$)";
 
@@ -12,7 +12,6 @@
 
 use lib '/home/httpd/lib/perl/';
 use LONCAPA::Configuration();
-use Apache::lonnet;
 %loncapavar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')};
 $port_to_use=$loncapavar{'lonhttpdPort'};
 if (!defined($port_to_use)) {
@@ -357,7 +356,7 @@
 	$address=~s/\/+/\//g;
         if ($address=~/^\/(status|adm\/|res\/adm\/)/) {
             $fail = 0;
-        } elsif (&Apache::lonnet::is_domainimage($address)) {
+        } elsif ($address =~ /^\/res\/([\w\.\-]+)\/\1\-domainconfig\/(logo|domlogo|img)\/[^\/]+$/) {
             $fail = 0;
         }
 #