web/views/staticcontrollers.py
changeset 8389 94f26e3b09bf
parent 8369 e538ad6f9b99
child 8427 63c4c65e4db1
--- a/web/views/staticcontrollers.py	Wed May 09 15:06:43 2012 +0200
+++ b/web/views/staticcontrollers.py	Wed Apr 18 12:01:31 2012 +0200
@@ -183,13 +183,14 @@
         if relpath.startswith(self.data_modconcat_basepath):
             paths = relpath[len(self.data_modconcat_basepath):].split(',')
             filepath = self.concat_files_registry.concat_cached_filepath(paths)
-            return self.static_file(filepath)
         else:
-            relpath = relpath[len(self.base_datapath):] # skip leading '/data/'
-        dirpath, rid = config.locate_resource(relpath)
-        if dirpath is None:
-            raise NotFound()
-        return self.static_file(osp.join(dirpath, rid))
+            # skip leading '/data/' and url params
+            relpath = relpath[len(self.base_datapath):].split('?', 1)[0]
+            dirpath, rid = config.locate_resource(relpath)
+            if dirpath is None:
+                raise NotFound()
+            filepath = osp.join(dirpath, rid)
+        return self.static_file(filepath)
 
 
 class FCKEditorController(StaticFileController):