Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
robocoder opened this Issue · 3 comments

1 participant

@robocoder
Collaborator

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
Collaborator

Observations:

  • 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"
@robocoder
Collaborator

(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
Collaborator

(In [3110]) refs #1683

@robocoder robocoder added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.