MantisBT: master-2.27 f5f1c6ad

Author Committer Branch Timestamp Parent
raspopov community master-2.27 2024-12-27 20:32 master-2.27 b7b43831
Affected Issues  0035199: Improvement of the file_get_mime_type() function
Changeset

Optimisation of work with plugins files. (0002064)

Fix the caching of plugin MIME file types

Update common types ($g_plugin_mime_types) used by plugin_file_include()

  • Replace the old 'text/javascript' with 'application/javascript'
  • Add modern SVG and WebP image types

Performance improvements:

  • avoid loading the magic database if not needed
  • Add 'Last-Modified' header and return 304 if unchanged

Fixes 0035199, PR https://github.com/mantisbt/mantisbt/pull/2064

Signed-off-by: Damien Regad dregad@mantisbt.org

mod - config_defaults_inc.php Diff File
mod - core/plugin_api.php Diff File