Commits

Ludovic Chabant committed 044a780

New version of Stupid_Http:
- fixed a bug with `nocache`-type query parameters on static files.

Comments (0)

Files changed (1)

_piecrust/libs/StupidHttp/StupidHttp_WebServer.php

                 $uri = substr($uri, $secondSlash);
             }
         }
+        $questionMark = strpos($uri, '?');
+        if ($questionMark !== false)
+        {
+            $uri = substr($uri, 0, $questionMark);
+        }
         if ($root === false) return false;
         return $root . str_replace('/', DIRECTORY_SEPARATOR, $uri);
     }