Diff for /loncom/lonnet/perl/londns.pm between versions 1.3 and 1.4

version 1.3, 2013/09/02 14:40:18 version 1.4, 2017/11/30 14:33:35
Line 36  use Apache::lonnet; Line 36  use Apache::lonnet;
   
 sub serve_file {  sub serve_file {
     my ($r,$file,$type)=@_;      my ($r,$file,$type)=@_;
     open(my $config,"<$Apache::lonnet::perlvar{'lonTabDir'}/$file");      if (open(my $config,"<","$Apache::lonnet::perlvar{'lonTabDir'}/$file")) {
     my $file = join('',<$config>);          my $contents = join('',<$config>);
     $r->content_type($type);          $r->content_type($type);
     $r->send_http_header;          $r->send_http_header;
     return OK if $r->header_only;          return OK if $r->header_only;
     $r->print($file);          $r->print($contents);
     return OK;          return OK;
       } else {
           return FORBIDDEN;
       }
 }  }
   
 sub handler {  sub handler {

Removed from v.1.3  
changed lines
  Added in v.1.4


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