git.cweiske.de
/
shpub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d2570fc
)
Determine URL file type from path, strip query parameters first
author
Christian Weiske
<cweiske@cweiske.de>
Thu, 22 Sep 2016 09:39:11 +0000
(11:39 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Thu, 22 Sep 2016 09:39:11 +0000
(11:39 +0200)
src/shpub/Command/AbstractProps.php
patch
|
blob
|
history
diff --git
a/src/shpub/Command/AbstractProps.php
b/src/shpub/Command/AbstractProps.php
index 7707ea9d22103f0d7cc32620745b2c729e2aaffd..90cc0fff70d7bfaaaea3da7e0767ade61656dc06 100644
(file)
--- 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
foreach ($files as $filePath) {
if (strpos($filePath, '://') !== false) {
//url
+ $urlPath = parse_url($filePath, PHP_URL_PATH);
$mte = new \MIME_Type_Extension();
$mte = new \MIME_Type_Extension();
- $mimetype = $mte->getMIMEType($
file
Path);
+ $mimetype = $mte->getMIMEType($
url
Path);
$media = \MIME_Type::getMedia($mimetype);
if (!isset($urlList[$media])) {
Log::err('File type not allowed: ' . $mimetype);
$media = \MIME_Type::getMedia($mimetype);
if (!isset($urlList[$media])) {
Log::err('File type not allowed: ' . $mimetype);