Uri extension set for specific types only rather than all

This commit is contained in:
Djamil Legato
2014-08-25 17:15:39 -07:00
parent e3626fcbcd
commit 2935d3cc0b

View File

@@ -82,7 +82,7 @@ class Uri
// remove the extension if there is one set
$parts = pathinfo($uri);
if (strpos($parts['basename'], '.')) {
if (preg_match("/\.(txt|xml|html|json|rss|atom)$/", $parts['basename'])) {
$uri = rtrim($parts['dirname'], '/').'/'.$parts['filename'];
$this->extension = $parts['extension'];
}