Issue #460 resolved

StaticFilter not working when Under root of sessionAuthenticateFilter

Anonymous created an issue

Not too sure what the issue is, but i get an exception of SessionFilter not enabled.

This is the structure of cfg file {{{ [/] sessionFilter.on = True sessionAuthenticateFilter.on=True

[/images] staticFilter.on=True staticFilter.dir="images" }}}

Here is the error message: {{{ Traceback (most recent call last): File "C:\Apps\PYTHON24\Lib\site-packages\cherrypy_cphttptools.py", line 269, in run applyFilters('beforeMain') File "C:\Apps\PYTHON24\Lib\site-packages\cherrypy_cphttptools.py", line 641, in applyFilters method() File "C:\Apps\PYTHON24\lib\site-packages\cherrypy\lib\filter\sessionauthenticatefilter.py", line 102, in beforeMain if (not cherrypy.session.get(sessionKey)) and notLoggedIn: File "C:\Apps\PYTHON24\Lib\site-packages\cherrypy\lib\filter\sessionfilter.py", line 442, in getattr raise SessionNotEnabledError() SessionNotEnabledError }}} but if i change cfg to

{{{ [/appname] sessionFilter.on = True sessionAuthenticateFilter.on=True [/images] staticFilter.on=True staticFilter.dir="images" }}} images are served

Reported by helonice@yahoo.com

Comments (2)

  1. Anonymous

    Well, the pb you were seeing is because session_authenticate_filter didn't work for static content ... I just checked in a fix ([960]) for this so you should now be able to use session_authenticate_filter in conjunction with static_filter

  2. Log in to comment