@robocoder opened this Issue on September 9th 2010 Contributor

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.

@robocoder commented on September 9th 2010 Contributor

Observations:

  • user reports that fileinfo PECL extension [doesn't work with the newer gnuwin32 magic file](http://ca.php.net/manual/en/fileinfo.installation.php#99079)
  • 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"
@robocoder commented on September 9th 2010 Contributor

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

Also:

  • small changes for coding style and phpdocs
  • fix unit tests when piwik not installed in web root directory
@robocoder commented on September 9th 2010 Contributor

(In [3110]) refs #1683

This Issue was closed on September 9th 2010
Powered by GitHub Issue Mirror