Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robocoder opened this issue Sep 9, 2010 · 3 comments
Closed

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

robocoder opened this issue Sep 9, 2010 · 3 comments
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@robocoder
Copy link
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
Copy link
Contributor Author

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
Copy link
Contributor Author

(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
Copy link
Contributor Author

(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
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant