Can we use Apache 2's magic file instead? #1683

robocoder opened this Issue Sep 9, 2010 · 3 comments

1 participant


I just noticed the gnuwin32/file/magic is over a half meg and most of the entries don't have associated mime types. Can we use Apache's magic file? (around 30K)

Otherwise, we should drop the finfo feature in Piwik::serveStaticFile() and require tht content type be set explicitly by the caller.



  • user reports that fileinfo PECL extension doesn't work with the newer gnuwin32 magic file
  • with Apache's magic file, I have to use FILEINFO_CONTINUE instead of FILENFO_MIEM, otherwise the result is always "application/octet-stream; charset=binary"

(In [3109]) fixes #1683 - removed the magic database to reduce bloat; content type is a mandatory parameter to Piwik::serveStaticFile()


  • small changes for coding style and phpdocs
  • fix unit tests when piwik not installed in web root directory

(In [3110]) refs #1683

@robocoder robocoder added this to the Piwik 1.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment