in reply to
>Also, is there a way to modify the CGI headers such that when the browser pops up the "Save As..." dialog, the default filename is something like "backup.tar.gz" instead of "backup.cgi"?
You can change the way the browser requests the document. However this may not be what you are after.
If the browser requests it asblah.com/backup.cgi/backup.tar.gz?any=args&you=want
It will prompt to save as backup.tar.gz and still call the backup.cgi script. You could just have calling backup.cgi without any args redirect to that location (well thats one possible solution).