0001-general-save-session-at-the-very-end-47154.patch
wcs/compat.py | ||
---|---|---|
228 | 228 |
# rendering may have altered it (for example a form would add its |
229 | 229 |
# token). |
230 | 230 |
self.session_manager.finish_successful_request() |
231 |
request.ignore_session = True # no further changes |
|
231 | 232 | |
232 | 233 |
for name, value in response.generate_headers(): |
233 | 234 |
if name in ('Connection', 'Content-Length'): |
wcs/middleware.py | ||
---|---|---|
91 | 91 |
def process_response(self, request, response): |
92 | 92 |
pub = get_publisher() |
93 | 93 |
if pub: |
94 |
request = pub.get_request() |
|
95 |
if request and not request.ignore_session: |
|
96 |
# it is necessary to save the session one last time as the actual |
|
97 |
# rendering may have altered it (for example a form would add its |
|
98 |
# token). |
|
99 |
pub.session_manager.finish_successful_request() |
|
100 | ||
94 | 101 |
pub.cleanup() |
95 | 102 |
return response |
96 | 103 | |
97 |
- |