Description of problem: When I attach tar.gz and I download it again it is demaged. Version-Release number of selected component (if applicable): current stable (3.2?) How reproducible: done twice Steps to Reproduce: 1. create foo.tar.gz 2. upload it as attachment to BZ, and manualy set mime type to application/x-gzip 3. download it 4. file foo.tar.gz foo.tar.gz: gzip compressed data, from Unix 4. gunzip foo.tar.gz 5. file foo.tar foo.tar: gzip compressed data, from Unix Actual results: #file foo.tar foo.tar: gzip compressed data, from Unix Expected results: # file foo.tar proxy-patches.tar: POSIX tar archive Additional info: If I rename the downloaded file to foo.tar.gz.gz and then double ungzipped it then I got the tar file I wanted.
I have asked the sys admins for Bugzilla to add the following to the apache configs which should hopefully fix this issue: SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar|iso)$ no-gzip dont-vary We will close this once I verify that this has fixed the problem. Dave
Created attachment 341223 [details] test gzipped attachment testing recent change
Sadly that did not fix the issue. Will need to investigate further.
Sadly attachment.cgi in Bugzilla creates a dynamic file download so the current SetEnvIfNoCase directives only work for request URI's and cannot filter on Content-Type. I have also tried other options such as mod_filter and AddOutputFilterByType without success. We are in the process of adding the following directive to the live bugzilla configs. This is a workaround for the moment which does fix the issue for my test case. # Don't compress if attachment SetEnvIfNoCase Request_URI /attachment\.cgi no-gzip dont-vary This is a hack in that any content delivered from the attachment.cgi will never be compressed even the text/html but people do no spend alot of time on that page and for the most part images/css/javascript will be cached on the client until it expires. Once this is in place I will verify it is working and ask you to try your case again as well. Dave
Ok works for me now. Can you verify for yourself and then close this bug if the issue is resolved? Dave
Created attachment 341391 [details] Test gzipped file
Yes, works for me. Thx.