Skip to content
Snippets Groups Projects
Commit 00d3f0a8 authored by Olav Morken's avatar Olav Morken
Browse files

module.php: Fix mimetype when filename contains ".".

Thanks to Sixto Martin for providing this patch.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2623 44740490-163a-0410-bde0-09ae8108e29a
parent 4009afbb
No related branches found
No related tags found
No related merge requests found
...@@ -140,7 +140,7 @@ try { ...@@ -140,7 +140,7 @@ try {
/* Find MIME type for file, based on extension. */ /* Find MIME type for file, based on extension. */
$contentType = NULL; $contentType = NULL;
if (preg_match('#\.([^/]+)$#D', $path, $type)) { if (preg_match('#\.([^/\.]+)$#D', $path, $type)) {
$type = strtolower($type[1]); $type = strtolower($type[1]);
if (array_key_exists($type, $mimeTypes)) { if (array_key_exists($type, $mimeTypes)) {
$contentType = $mimeTypes[$type]; $contentType = $mimeTypes[$type];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment