add equivalent of trailing_slash tool for static content
The trailing_slash tool only affects requests for dynamic pages; it has no effect on requests for static content. But the same functionality ought to be available for static content requests as well. A quick and dirty way to achieve this effect is simply to remove the second condition in the IF test in the third last line of cherrypy.lib.static.staticdir. In other words, if that line reads just 'if index:' instead of 'if index and filename[-1] in (r"\/"):', cherrypy serves up static content just fine whether or not the URL submitted has a trailing slash. Of course, this doesn't leave the option for rejecting requests submitted without a trailing slash. If that option is deemed necessary, a proper tool would have to be constructed.
Reported by Ricardo