Our goals include that return a 302 response if session verify failed
and we could implement the feature in WSGI middleware. But that means
we must write raw http-response code... I think web.tempredirect
func() is more graceful, so we add this routine in _loadhooks. Then we
found web.tempredirect in _loadhooks would not stop process and page
couldn't be redirected... :(
Could you change it to support our requirement?? I think just move
"_load(env)" to next line :)
def wsgifunc(func, *middleware):
"""Returns a WSGI-compatible function from a webpy-function."""
middleware = list(middleware)
def wsgifunc(env, start_resp):
# move it to nextline, _load(env)
try:
_load(env)
result = func()
except StopIteration:
result = None
except:
print >> debug, traceback.format_exc()
result = internalerror()
.....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---