bypass all session logic when application does not exist, and close files

This commit is contained in:
mdipierro committed 2013-08-29 08:22:35 -05:00
1 parent 1ffd110d05
commit 70a1fbfd41
2 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.29.08.09.00 Version 2.6.0-development+timestamp.2013.08.29.08.21.46
+4 -5
View File
@@ -455,14 +455,14 @@ def wsgibase(environ, responder):
except HTTP, http_response: except HTTP, http_response:
# if this is a static file if static_file:
# or the application does not exist
if static_file or not hasattr(current,'request'):
return http_response.to(responder, env=env) return http_response.to(responder, env=env)
if request.body: if request.body:
request.body.close() request.body.close()
if hasattr(current,'request'):
# ################################################## # ##################################################
# on success, try store session in database # on success, try store session in database
# ################################################## # ##################################################
@@ -474,8 +474,6 @@ def wsgibase(environ, responder):
if response.do_not_commit is True: if response.do_not_commit is True:
BaseAdapter.close_all_instances(None) BaseAdapter.close_all_instances(None)
# elif response._custom_commit:
# response._custom_commit()
elif response.custom_commit: elif response.custom_commit:
BaseAdapter.close_all_instances(response.custom_commit) BaseAdapter.close_all_instances(response.custom_commit)
else: else:
@@ -507,6 +505,7 @@ def wsgibase(environ, responder):
elif session._secure: elif session._secure:
rcookies[response.session_id_name]['secure'] = True rcookies[response.session_id_name]['secure'] = True
http_response.cookies2headers(rcookies) http_response.cookies2headers(rcookies)
ticket = None ticket = None
except RestrictedError, e: except RestrictedError, e: