M
maxwelton
I have the following in a csh script. This is run on a remote system
and the
goal is to allow a user on a client to tar and gzip files and download
them to
their system. All I get is streamed data to the browser. Any help
would
be appreciated.
# ! /bin/csh
echo "Content-description: File Transfer'\n"
echo "'Content-type: application/x-gzip\n'"
echo "Content-disposition: attachment; filename=\"site.tar.gz\"\n";
# < do some file redirection in here ->
tar cf - * | gzip -c
#end
The interesting thing is if I do:
tar cf - * | gzip -c > site.tar.gz
then the file is able to be unzipped and untarred and it is all good.
I think my problem is somewhere in those 'content' headers. I can
also try :
tar zcf - * | cat
and this streams the data to the browser as well.
and the
goal is to allow a user on a client to tar and gzip files and download
them to
their system. All I get is streamed data to the browser. Any help
would
be appreciated.
# ! /bin/csh
echo "Content-description: File Transfer'\n"
echo "'Content-type: application/x-gzip\n'"
echo "Content-disposition: attachment; filename=\"site.tar.gz\"\n";
# < do some file redirection in here ->
tar cf - * | gzip -c
#end
The interesting thing is if I do:
tar cf - * | gzip -c > site.tar.gz
then the file is able to be unzipped and untarred and it is all good.
I think my problem is somewhere in those 'content' headers. I can
also try :
tar zcf - * | cat
and this streams the data to the browser as well.