Uploading a .tar.gz or .tgz file seems to go fine. The "tar tzf" command on the back-end file returns the archive's file listing and "gzip -t" does not show any errors. However, downloading the file with Chrome or FireFox into WinRar claims the archive is corrupt. Downloading the same file with IE works just fine. One of the files in question:
http://bartk.us/t/tiki-download_file.php?fileId=30
Feel free to test. I found a bug from 2006 where this was also happening and it suggested turning off gzip output compression. Looking at the performance settings (it used to be in general) I see gzip output compression was already off, so I turned it on. This did not fix the behavior.
Other files (images and a .rar file) are served A-OK, it is just the .tar.gz and .tgz files that screw up. Back-end storage checksum matches the original file:
$ md5sum THD-fig4.tgz /var/www/localhost/htdocs/tikifiles/7271d5da7a5dc935fe2576ef0a427a69
663f408c4dfc6ca864756f70aa2f9f29 THD-fig4.tgz
663f408c4dfc6ca864756f70aa2f9f29 /var/www/localhost/htdocs/tikifiles/7271d5da7a5dc935fe2576ef0a427a69
This means upload is working A-OK it's just the download that's screwing up. I've edited /etc/mime.types to move the "tgz" extension from the default "application/x-gtar" into "application/octet-stream", but this did not help the file corruption. One of the downloaded files is:
-rw-r--r-- 1 eo eo 60247 Jul 16 21:24 THD-fig4 (2).tar.gz
f3e4f281d2041ce2554d343156b4a1ce THD-fig4 (2).tar.gz
The original being:
-rw-rw---- 1 eo eo 60997 Jul 16 20:36 THD-fig4.tgz
The gzip layer looks in tact on the broken file, but the tar layer isn't OK:
eo@jo ~/THD $ gzip -t "THD-fig4 (2).tar.gz"
eo@jo ~/THD $ echo $?
eo@jo ~/THD $ tar tzf "THD-fig4 (2).tar.gz"
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
eo@jo ~/THD $
A little further investigation shows the file is double compressed!
eo@jo ~/THD $ gunzip < "THD-fig4 (2).tar.gz" > "THD-fig4 (2).tar"
eo@jo ~/THD $ file "THD-fig4 (2).tar"
THD-fig4 (2).tar: gzip compressed data, from Unix, last modified: Sat Jul 16 20:36:37 2011
eo@jo ~/THD $ tar tzf "THD-fig4 (2).tar"
THD-fig4-lin-large.gnuplot
THD-fig4-lin.gnuplot
THD-fig4-ranged-large.gnuplot
THD-fig4-ranged.gnuplot
gnuplot.rot
THD.log
THD-ReB=220m-ReS=1m-ReE=221m-RlB=8-RlS=1-RlE=9-VbB=0u-VbS=10000u-VbE=1000000u-IbB=1550000u-IbS=4000u-IbE=1950000u.log
eo@jo ~/THD $
Even with the mime type set back to the original "application/x-gtar" this is the case. Even with gzip output compression disabled now and chrome cache cleared, the file still is presented corrupted by the server.
Help!
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |