Diff for /loncom/lonhttpd between versions 1.9 and 1.14

version 1.9, 2003/07/30 15:28:56 version 1.14, 2007/04/13 15:43:42
Line 51  if ($port_to_use eq '80') { die('Apache Line 51  if ($port_to_use eq '80') { die('Apache
  "mpeg" => "video/mpeg",   "mpeg" => "video/mpeg",
  "mpg" => "video/mpeg",   "mpg" => "video/mpeg",
  "jpeg" => "image/jpeg",   "jpeg" => "image/jpeg",
  "jpg" => "image/jpeg");   "jpg" => "image/jpeg",
            "png" => "image/png");
   
 $logfile = "/home/httpd/perl/logs/lonhttpd.log";  $logfile = "/home/httpd/perl/logs/lonhttpd.log";
   
Line 61  $pidfile="/home/httpd/perl/logs/lonhttpd Line 62  $pidfile="/home/httpd/perl/logs/lonhttpd
   
 if (-e $pidfile) {  if (-e $pidfile) {
    open(LFH,"$pidfile");     open(LFH,"$pidfile");
    my $pide=<$LFH>;     my $pide=<LFH>;
    chomp($pide);     chomp($pide);
    close(LFH);     close(LFH);
    if (kill 0 => $pide) { die "already running"; }     if (kill 0 => $pide) { die "already running"; }
Line 348  while (<STDIN>) { Line 349  while (<STDIN>) {
  1 while $address =~ s#/\.(/|$)#\1#;   1 while $address =~ s#/\.(/|$)#\1#;
         1 while $address =~ s#/[^/]*/\.\.(/|$)#\1#;          1 while $address =~ s#/[^/]*/\.\.(/|$)#\1#;
  1 while $address =~ s#^/\.\.(/|$)#\1#;   1 while $address =~ s#^/\.\.(/|$)#\1#;
  $fail = 0;   $fail = 1;
 #  #
 # Heavily customized for LON-CAPA  # Heavily customized for LON-CAPA
 #  #
  $address=~s/\/+/\//g;   $address=~s/\/+/\//g;
  unless ($address=~/^\/(status|adm\/|res\/adm\/)/) { $fail=1; }          if ($address=~/^\/(status|adm\/|res\/adm\/)/) {
               $fail = 0;
           } elsif ($address =~ /^\/res\/([\w\.\-]+)\/\1\-domainconfig\/(logo|domlogo|img)\/[^\/]+$/) {
               $fail = 0;
           }
 #  #
 # because existing restriction matrix would not do precedence across rules  # because existing restriction matrix would not do precedence across rules
 #  #

Removed from v.1.9  
changed lines
  Added in v.1.14


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>