On 10.02.2013 18:11, Antoine Pitrou wrote: > M.-A. Lemburg <mal <at> egenix.com> writes: >> >> On 10.02.2013 18:00, Antoine Pitrou wrote: >>> $ curl -I >>> > http://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.0.3.tar.gz >>> HTTP/1.1 200 OK >>> Server: nginx/1.1.19 >>> Date: Sun, 10 Feb 2013 16:59:29 GMT >>> Content-Type: application/octet-stream >>> Content-Length: 140124 >>> Last-Modified: Mon, 31 Dec 2012 18:23:12 GMT >>> Connection: keep-alive >>> Accept-Ranges: bytes >>> >>> >>> But: >>> >>> [>>>] mimetypes.guess_type("foo.tar.gz") >>> ('application/x-tar', 'gzip') >> >> I suppose this is done to make sure that browsers open the >> "save as" dialog on the original file. >> >> If you instead set the correct MIME type >> on these files, browsers often tend to transparently decompress >> the files before offering to save them, which is not what >> you want in this use case. > > It's precisely what I want, actually. I wanted the file to open in > the archive manager, not in my text editor (or any other program chosen > at random by the OS / browser).
Well, yes, but you normally want to be able to save the original foo.tar.gz file instead of the foo.tar file. Perhaps PyPI could send the mime type application/x-compressed-tar to allow having both. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 10 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________________ Catalog-SIG mailing list Catalog-SIG@python.org http://mail.python.org/mailman/listinfo/catalog-sig