Changeset 17928


Ignore:
Timestamp:
07/23/14 11:06:08 (10 years ago)
Author:
tbretz
Message:
Error codes are not displayed anymore by the browser, fixed that by returning plain text; added gcn, gpsctrl and sqmctrl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/showlog/index.php

    r16466 r17928  
    297297{
    298298    header('WWW-Authenticate: Basic realm="SmartFACT++"');
    299     header('HTTP/1.0 401 Unauthorized');
     299    header('HTTP/1.1 401 Unauthorized');
    300300    return;
    301301}
     
    303303$rc = login();
    304304if ($rc!="")
    305     return header('HTTP/1.0 401 '.$rc);
     305    return header('HTTP/1.1 401 '.$rc);
    306306
    307307$refresh = isset($_GET['refresh']) ? $_GET['refresh'] : -1;
     
    315315
    316316if (!strpos($prg, "/")===false || !strpos($dir, "/")===false)
    317     return header('HTTP/1.0 403 Access forbidden.');
     317{
     318    header('HTTP/1.1 403 Access forbidden.');
     319    print("HTTP/1.1 403 Access forbidden.\n");
     320    return;
     321}
    318322
    319323if (empty($_GET['dir']))
     
    332336$size = filesize($filename);
    333337if ($size>30000000) // 30MB
    334     return header('HTTP/1.0 403 File too large.');
     338{
     339    header('HTTP/1.1 403 File too large.');
     340    print("File too large.\n");
     341    return;
     342}
    335343
    336344// FIXME: Reading the file line by line avoids any danger that
     
    338346$file = file($filename);
    339347if ($file===false)
    340     return header('HTTP/1.0 403 Access forbidden.');
     348{
     349    header('HTTP/1.1 403 Access forbidden.');
     350    print("Access forbidden.\n");
     351    return;
     352}
    341353
    342354$max = 10000;
     
    392404               <li><a href="?log=fscctrl">fscctrl</a></li>
    393405               <li><a href="?log=ftmctrl">ftmctrl</a></li>
     406               <li><a href="?log=gcn">gcn</a></li>
     407               <li><a href="?log=gpsctrl">gpsctrl</a></li>
    394408               <li><a href="?log=lidctrl">lidctrl</a></li>
    395409               <li><a href="?log=magiclidar">magiclidar</a></li>
     
    399413               <li><a href="?log=ratecontrol">ratecontrol</a></li>
    400414               <li><a href="?log=ratescan">ratescan</a></li>
     415               <li><a href="?log=sqmctrl">sqmctrl</a></li>
    401416               <li><a href="?log=temperature">temperature</a></li>
    402417               <li><a href="?log=timecheck">timecheck</a></li>
Note: See TracChangeset for help on using the changeset viewer.