question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detect .zip file as application/zip instead of application/x-zip-compressed

See original GitHub issue

The feature that auto-detects the Content-Type header based on the filename extension when using @filename (the “Body Data From a Filename” feature) detects a .zip file as application/x-zip-compressed. I think it should use application/zip instead. Thanks for considering!

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubroztocilcommented, Nov 23, 2013

@jbyler, what OS and Python version do you use?

The mime type is detected using the Python’s mimetype module, which for me (OS X 10.9, Python 2.7.6) correctly returns application/zip:

$ python -m mimetypes foo.zip
type: application/zip encoding: None
0reactions
jbylercommented, Dec 17, 2013

I will say that it seems like there’s probably a design flaw in here somewhere, given that installing mutt can create problems for httpie. I don’t think the design flaw is with httpie. Perhaps the mimetypes module ought to provide a mechanism for an application (mutt) to customize mime.types in a way that is local to that application, rather than global for all users of the mimetypes module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

rar, .zip files MIME Type - Stack Overflow
I would do a check on the file name too. Here is how you could check if the file is a RAR or...
Read more >
application/zip
This descriptor is used only when it was not possible to seek in the output zip file, e.g., when the output zip file...
Read more >
application/x-zip-compressed - mimetype.io
Instead please use application/zip. ZIP is one of the most popular file compression formats. It was created in 1989 as the native format...
Read more >
Python's zipfile: Manipulate Your ZIP Files Efficiently
ZIP files allow you to aggregate, compress, and encrypt files into a single interoperable and portable container. You can stream ZIP files, ...
Read more >
ZIP file MIME type is not recognized - Bugzilla@Mozilla
This is a good guess, but my copy of Windows thinks zip files are application/x-zip-compressed and that works fine. And in fact, we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found