[Bio] / FigWebServices / ss_export.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/ss_export.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Thu May 27 17:19:05 2004 UTC revision 1.4, Thu May 27 18:47:05 2004 UTC
# Line 133  Line 133 
133      close($all_fh);      close($all_fh);
134      close($allprot_fh);      close($allprot_fh);
135    
136  #    print "Content-Type: application/x-tar\n";      my $outname = "$subsystem.$$.tar.gz";
137      print "Content-Disposition:attachment;filename=$subsystem.tar.gz\n";      $outname =~ s/[^\w.-]/_/g;
138    
139        system("tar czf ../$outname .");
140        my $size = (stat("../$outname"))[7];
141    
142      print "Content-Type: application/octet-stream\n";      print "Content-Type: application/octet-stream\n";
143      #    print "Content-Encoding: x-gzip\n";      print "Content-Length: $size\n";
144        print "Content-Disposition:attachment;filename=$outname\n";
145      print "\n";      print "\n";
146      system("tar czf - .");  
147        my $buf;
148        open(my $myout, "<../$outname");
149        while (read($myout, $buf, 4096))
150        {
151            print $buf;
152        }
153        close($myout);
154    
155      chdir("..");      chdir("..");
156      system("rm -r $tmp");      system("rm -r $tmp");

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3