From 2fd49930473aa9a46ba5a1755606a51764e5175f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 22 Sep 2016 11:39:11 +0200 Subject: [PATCH 1/1] Determine URL file type from path, strip query parameters first --- src/shpub/Command/AbstractProps.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shpub/Command/AbstractProps.php b/src/shpub/Command/AbstractProps.php index 7707ea9..90cc0ff 100644 --- a/src/shpub/Command/AbstractProps.php +++ b/src/shpub/Command/AbstractProps.php @@ -215,8 +215,9 @@ class Command_AbstractProps foreach ($files as $filePath) { if (strpos($filePath, '://') !== false) { //url + $urlPath = parse_url($filePath, PHP_URL_PATH); $mte = new \MIME_Type_Extension(); - $mimetype = $mte->getMIMEType($filePath); + $mimetype = $mte->getMIMEType($urlPath); $media = \MIME_Type::getMedia($mimetype); if (!isset($urlList[$media])) { Log::err('File type not allowed: ' . $mimetype); -- 2.30.2