r4304 proxyStaticURI(): add rows for JPEG and make suffix check case-insensitive
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 9 Mar 2011 09:45:27 +0000 (09:45 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 9 Mar 2011 09:45:27 +0000 (09:45 +0000)
wwwroot/inc/functions.php

index 6c8389e866cff1fc7b664a0dda745bf58edb3d84..b1c49810c144f59887de222f6e12fb0fe3fff34f 100644 (file)
@@ -4734,13 +4734,15 @@ function proxyStaticURI ($URI)
                'html' => 'text/html',
                'png' => 'image/png',
                'gif' => 'image/gif',
+               'jpg' => 'image/jpeg',
+               'jpeg' => 'image/jpeg',
        );
        $matches = array();
        if
        (
                ! preg_match (RE_STATIC_URI, $URI, $matches)
                or ! in_array ($matches[1], array ('pix', 'css', 'js'))
-               or ! array_key_exists ($matches[2], $content_type)
+               or ! array_key_exists (strtolower ($matches[2]), $content_type)
        )
                printStatic404();
        global $racktables_staticdir;