[Pkg-exppsy-maintainers] Fwd: [siteadmin-Support Requests][310930] Files uploaded to the file release system get corrupted.

Michael Hanke michael.hanke at gmail.com
Fri Jul 4 04:38:19 UTC 2008


FYI:


----- Forwarded message from siteadmin-supportrequests at alioth.debian.org -----

Date: Thu, 03 Jul 2008 23:20:59 +0000
From: siteadmin-supportrequests at alioth.debian.org
To: noreply at alioth.debian.org
Subject: [siteadmin-Support Requests][310930] Files uploaded to the file
	release system get corrupted.
Reply-to: siteadmin-supportrequests at alioth.debian.org

Support Requests item #310930, was opened at 2008-07-03 15:14
>Status: Closed
Priority: 3
Submitted By: Michael Hanke  (mhanke-guest)
>Assigned to: Stephen Gran (sgran)
Summary: Files uploaded to the file release system get corrupted. 
Category: GForge
Group: None
>Resolution: Fixed
Tags: None


Initial Comment:
Hi,


some time ago we uploaded a file to the GForge file release system:

http://alioth.debian.org/frs/download.php/2496/pymvpa_0.2.2.tar.gz

the original file has:

hanke at balin:~/hacking$ md5sum pymvpa_0.2.2.tar.gz
8499895cf9faf110ad50076cd7f2fd69  pymvpa_0.2.2.tar.gz

today I discovered that the file when downloaded from Alioth has:

hanke at balin:~/hacking$ md5sum pymvpa_0.2.2_alioth.tar.gz
883aee1f349e36006669d53fc5dbd85e  pymvpa_0.2.2_alioth.tar.gz


I tried re-uploading the file several times today (using both konqueror and firefox), but the situation is always the same.

Even worse, it seems to affects all files (only checked *.tar.gz, though), i.e. any tarball in the release system is broken!


What could be wrong?


Thanks in advance,

Michael

----------------------------------------------------------------------

>Comment By: Stephen Gran (sgran)
Date: 2008-07-04 00:20

Message:
Definitely the culprit.  After disabling deflate:

wget --header='Accept-Encoding: gzip,deflate' http://alioth.debian.org/frs/download.php/2496/pymvpa_0.2.2.tar.gz

[...]

md5sum pymvpa_0.2.2.tar.gz 
8499895cf9faf110ad50076cd7f2fd69  pymvpa_0.2.2.tar.gz

So, even though we're using the stock config that only gzips text/{html,xml} etc, and the download.php script adds a header application/binary, we're still getting gzip compression of the result.

It looks to me like the php header() function doesn't affect apache's idea of the output type, and apache still tries to gzip it.

----------------------------------------------------------------------

Comment By: Stephen Gran (sgran)
Date: 2008-07-03 23:32

Message:
Yes, it's really looks like that is the problem:

sg at alioth:~$ curl -I http://alioth.debian.org/frs/download.php/2496/pymvpa_0.2.2.tar.gz
HTTP/1.1 200 OK
Date: Thu, 03 Jul 2008 22:24:17 GMT
Server: Apache/2.2.3 (Debian) PHP/4.4.4-8+etch6 mod_ssl/2.2.3 OpenSSL/0.9.8c
X-Powered-By: PHP/4.4.4-8+etch6
Content-disposition: filename="pymvpa_0.2.2.tar.gz"
Content-length: 2208778
Vary: Accept-Encoding
Content-Type: application/binary

sg at alioth:~$ curl -I http://alioth.debian.org/frs/download.php/2496/pymvpa_0.2.2.tar.gz -H 'Accept-Encoding: gzip,deflate'
HTTP/1.1 200 OK
Date: Thu, 03 Jul 2008 22:30:21 GMT
Server: Apache/2.2.3 (Debian) PHP/4.4.4-8+etch6 mod_ssl/2.2.3 OpenSSL/0.9.8c
X-Powered-By: PHP/4.4.4-8+etch6
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/html; charset=UTF-8

Note how the second one says the content encoding is gzip, and no longer includes the Content-disposition header with the filename.  I'm not sure if this is actually a browser bug or an apache bug, but I'll try to work around it in apache.

----------------------------------------------------------------------

Comment By: Stephen Gran (sgran)
Date: 2008-07-03 23:19

Message:
Ah.  This may very well be related to a recent change I made to the apache config (enabling mod_deflate).  I'll add application/gzip to the exclusiong list and see how that does.

----------------------------------------------------------------------

Comment By: Michael Hanke  (mhanke-guest)
Date: 2008-07-03 19:04

Message:
We just discovered that the files do not get corrupted, but gzipped again (maybe right after uploading). So a .tar.gz actually becomes a tar.gz.gz which
tar does not recognize as something meaningful anymore.

Cheers,

Michael

----------------------------------------------------------------------

You can respond by visiting: 
http://alioth.debian.org/tracker/?func=detail&atid=200001&aid=310930&group_id=1

----- End forwarded message -----

-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050



More information about the Pkg-exppsy-maintainers mailing list