Show More
@@ -93,6 +93,9 b' class FileStoreView(BaseAppView):' | |||
|
93 | 93 | |
|
94 | 94 | file_path = self.storage.store_path(file_uid) |
|
95 | 95 | return FileResponse(file_path) |
|
96 | # For file store we don't submit any session data, this logic tells the | |
|
97 | # Session lib to skip it | |
|
98 | setattr(self.request, '_file_response', True) | |
|
96 | 99 | |
|
97 | 100 | @LoginRequired() |
|
98 | 101 | @NotAnonymous() |
@@ -32,10 +32,14 b' def BeakerSessionFactoryConfig(**options' | |||
|
32 | 32 | |
|
33 | 33 | def session_callback(request, response): |
|
34 | 34 | exception = getattr(request, 'exception', None) |
|
35 | if (exception is None or self._cookie_on_exception) and self.accessed(): | |
|
35 | file_response = getattr(request, '_file_response', None) | |
|
36 | ||
|
37 | if file_response is None \ | |
|
38 | and (exception is None or self._cookie_on_exception) \ | |
|
39 | and self.accessed(): | |
|
36 | 40 | self.persist() |
|
37 | 41 | headers = self.__dict__['_headers'] |
|
38 |
if headers |
|
|
42 | if headers.get('set_cookie') and headers.get('cookie_out'): | |
|
39 | 43 | response.headerlist.append(('Set-Cookie', headers['cookie_out'])) |
|
40 | 44 | request.add_response_callback(session_callback) |
|
41 | 45 |
General Comments 0
You need to be logged in to leave comments.
Login now