#! /usr/local/bin/perl

print "Content-type: vod/mps\n\n";
#print "Access with get method only\n" unless $ENV{'REQUEST_METHOD'} eq 'GET';

($server,$fname,$file_off,$enc,$len,$st_fr,$en_fr,$st_of,$en_of,$foff,$fr_st)=split(/\&/,$ENV{'QUERY_STRING'});

#vser: "$server&$fname&$cfi_of&$enc&$len&$st_fr&$en_fr&$st_of&$en_of&$foff&$file_off&$fr_st";

# distinguish url port and path

($dummy, $url, $rest)=split (/\:/, $foff);

#$url = 'file:'.$url;       # concatenate word file: and $url

$url = substr($url,2);
$rest =~ /^(\d+)(.*)/;
($port, $path)=($1, $2);

$file_off .= $st_of unless ($file_off);



print "$server\n";             # server name
print "$fname\n";             # filename


print "$file_off\n";             # offset

print "$url $port $path\n";





