Just in case someone interested in the answer, the following looks like
the correct one.

> what is the correct way for letting the user to download the binary
> file as script's response ?

#!/usr/bin/perl

use CGI qw(:standard);

print header;
print << 'STOP';
<html>
<head>
        <meta HTTP-EQUIV="Refresh" content="0;URL=/file.tar.gz">
</head>
<body>
        Text, usually a direct link to the file as not all browsers
        support the above used 'client-side pull'
</body>
</html>
STOP

The detailed info may be found in "CGI Developer's Guide", by Eugene Eric Kim
Chapter 14, Proprietary Extensions, Client-Side Pull

Reply via email to