IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 14, 2009, 9:10:07 AM (17 years ago)
Author:
bills
Message:

remove usage of dsfits.cgi it doesn't work though the proxy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStoreServer/web/cgi/dsgetindex

    r24175 r25366  
    140140            # 'text/plain' format
    141141            print header('text/plain', '404 ERROR');
    142             #print header('text/plain', '200 OK');
     142#           print header('text/plain', '410 GONE');
     143#            print header('text/plain', '200 OK');
    143144            print @$stderr_buf;
    144145            print STDERR @$stderr_buf;
     146#            exit 410;
    145147        }
    146148    }
     
    172174#
    173175
    174 sub print_free_space {
    175     use Filesys::Df;
    176         # get free space
    177         my $ref = df($DS_ROOT);
    178         printf '<p>Free space: %.2f G (%.1f%%)</p>',
    179                 $ref->{bfree}/(1024*1024),
    180                 100.0*$ref->{bfree}/$ref->{blocks};
    181         print "\n";
    182 }
     176#sub print_free_space {
     177#    use Filesys::Df;
     178#       # get free space
     179#       my $ref = df($DS_ROOT);
     180#       printf '<p>Free space: %.2f G (%.1f%%)</p>',
     181#               $ref->{bfree}/(1024*1024),
     182#               100.0*$ref->{bfree}/$ref->{blocks};
     183#        print "\n";
     184#}
    183185sub pprint_pre {
    184186
    185187    print header('text/html', '200 OK');
    186     print start_html('Data Store');
     188    my $name;
     189    # note $fileset is not so we look at the name of the index script to determine the level
     190    if ($program eq "dsfsindex") {
     191        $name = $fileset;
     192    } elsif ($program eq "dsprodindex") {
     193        $name = "$product";
     194    } else {
     195        $name = "";
     196    }
     197    print start_html("IPP Data Store $name");
    187198
    188199
     
    208219    print p();
    209220
    210     print_free_space();
     221#    print_free_space();
    211222    print end_html();
    212223}
     
    241252            # if this is a file request, use a download cgi
    242253            if ($wpath =~ /\.fits\s*$/) {
    243                     $wpath = '/ds-cgi/dsfits.cgi?'.substr($wpath, 4); # strip' /ds/'
     254                # This doesn't work through the proxy
     255                # The /ds-cgi gets tried on alala
     256                #    $wpath = '/ds-cgi/dsfits.cgi?'.substr($wpath, 4); # strip' /ds/'
    244257            }
    245258
    246         print a({-href=>$wpath}, $toks[0]);
     259        print a({-href=>$wpath, -type=>'image/x-fits'}, $toks[0]);
    247260    }
    248261
Note: See TracChangeset for help on using the changeset viewer.