id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
7334	[Patch] Case Sensitive Regex	uray	bobbysmith007	because the value of key in config file (trac.ini) will all be turned to lower case by system, so if any capital letter in url-regex (as key) settings will lost its meaning, following is my quick fix (also fix the class name issue, BTW):\r\n{{{\r\nIndex: 0.11/addstaticresourcesplugin/api.py\r\n===================================================================\r\n--- 0.11/addstaticresourcesplugin/api.py        (revision 8215)\r\n+++ 0.11/addstaticresourcesplugin/api.py        (working copy)\r\n@@ -8,7 +8,7 @@\r\n def urljoin(*args):\r\n   return '/'.join([i.strip('/') for i in args])\r\n\r\n-class AddStaticResourcesComponent (Component):\r\n+class AddStaticResourceComponent (Component):\r\n   implements (IRequestFilter, ITemplateProvider)\r\n   # IRequestHandler methods\r\n   def pre_process_request(self, req, handler):\r\n@@ -24,10 +24,12 @@\r\n     self.log.debug("AddStaticResourceComponent: about to add resources, %s ,%s"%(req, handler))\r\n     c = self.env.config\r\n     resources = c.options(srkey)\r\n-    for regex, value in resources:\r\n+    for key, value in resources:\r\n+      map = value.split(' ')\r\n+      regex = map[0]\r\n+      paths = map[1:]\r\n       self.log.debug("AddStaticResourceComponent: Regex:'%s' matched:%s" %(regex,re.search(regex, req.path_info)))\r\n       if re.search(regex, req.path_info):\r\n-        paths = c.getlist(srkey, regex)\r\n         for p in paths:\r\n           if p.endswith("js"):\r\n             add_script(req,urljoin(srkey, p))\r\n}}}\r\n\r\nby this fix, url-regex is moved to value part, and key is ignored, so the config setting will like this:\r\n{{{\r\n[static_resources]\r\nmap1 = /wiki/SomePage list_of_files.js and_style.css\r\n}}}	defect	closed	normal	AddStaticResourcesPlugin	normal	fixed			0.11
