1. Thomas Waldmann
  2. moin-2.0
  3. Issues
Issue #307 new

Wrong contenttype saved on uploaded .gz files

created an issue

When uploading files the fast way: Global Index > Actions > New Item > Upload Files > (select a file) > Start All; then the wrong contenttype is given to .gz files.

An example is the attached file, test-tgz.tar.gz, which has a single member, sitelutions_dns_update.sh.

After uploading the file to moin2, the contenttype is "application/x-sh" rather than the expected "application/x-tar". (see http://test.moinmo.in/test-tgz.tar.gz).

From idle:

>>> mimetypes.guess_type('test-tgz.tar.gz')
('application/x-tar', 'gzip')

This seems to happen to all .gz files. The .gz files were created on Windows 7 with 7-Zip.

Comments (1)

  1. Thomas Waldmann repo owner

    i uploaded the identical file (using firefox under linux) and got this:

    "contenttype": "application/x-gzip",

    so at least somewhat correct, although not optimal for our purposes (listing the contents of the tar archive)

  2. Log in to comment