)]}'
{"horizon/middleware.py":[{"author":{"_account_id":6650,"name":"Eric Peterson","email":"ejpetey@gmail.com","username":"ericpeterson-l"},"change_message_id":"fc448c62e4084c94be323e690496235eaa15ebb8","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            self.logout_reason \u003d _(\"Session timed out.\")"},{"line_number":75,"context_line":"            utils.add_logout_reason(request, response, self.logout_reason)"},{"line_number":76,"context_line":"            return response"},{"line_number":77,"context_line":"        request.session[\u0027last_activity\u0027] \u003d timestamp"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def process_exception(self, request, exception):"},{"line_number":80,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F%2Bklo%3D","line":77,"updated":"2013-11-22 23:54:17.000000000","message":"this line above is where the problem lies.... once a field in the session is modified, the session needs to be persisted again.\n\nWhen you select a different project and your token gets rescoped, and ajax calls are underway.... you have no idea which version of the session will be persisted....  the one with the old invalid token or the new session.\n\nIn addition, for pages with several repeated ajax requests this can cause the session back end to see many rewrites  / thrashing","commit_id":"49d1151ed19c92ae55ee67321acde76b6a15fe93"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"838762ea1a259f5439224a4a16763cf7f2773d9f","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            utils.add_logout_reason(request, response, self.logout_reason)"},{"line_number":74,"context_line":"            return response"},{"line_number":75,"context_line":"        if request.is_ajax():"},{"line_number":76,"context_line":"            return"},{"line_number":77,"context_line":"        request.session[\u0027last_activity\u0027] \u003d timestamp"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def process_exception(self, request, exception):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F92JA%3D","line":76,"updated":"2013-12-05 10:07:06.000000000","message":"We should probably use \"return None\" here, although it has the same result as the code above it provides clarity. As the the process_request() method must either return a None or an HttpResponse.","commit_id":"99186ff4aa6149294b75336260046b91401ce4a2"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"80ba3135398766241e4e861e23b08451fa2de6e5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                           \u0027panel\u0027: None,"},{"line_number":67,"context_line":"                           \u0027async_messages\u0027: []}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if request.is_ajax():"},{"line_number":70,"context_line":"            # if the request is Ajax we do not want to proceed, as clients can"},{"line_number":71,"context_line":"            #  1) create pages with constant polling, which can create race"},{"line_number":72,"context_line":"            #     conditions when a page navigation occurs"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2Fgsk%3D","line":69,"updated":"2014-03-05 17:21:43.000000000","message":"Why not do the validation at the beginning of the function? It avoids useless processing.","commit_id":"6227ddc64ebb49675458540df9e405b0b84fb9e7"},{"author":{"_account_id":6650,"name":"Eric Peterson","email":"ejpetey@gmail.com","username":"ericpeterson-l"},"change_message_id":"0a306f7fda61bd5bf9d6a3655cf0e474974848a8","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                           \u0027panel\u0027: None,"},{"line_number":67,"context_line":"                           \u0027async_messages\u0027: []}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if request.is_ajax():"},{"line_number":70,"context_line":"            # if the request is Ajax we do not want to proceed, as clients can"},{"line_number":71,"context_line":"            #  1) create pages with constant polling, which can create race"},{"line_number":72,"context_line":"            #     conditions when a page navigation occurs"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2Fgbo%3D","line":69,"in_reply_to":"AAAAVn%2F%2Fgsk%3D","updated":"2014-03-05 17:46:16.000000000","message":"Some requests need the request.horizon info to be set for everything to work correctly.  Otherwise a lot of the horizon framework type pieces don\u0027t have everything they need","commit_id":"6227ddc64ebb49675458540df9e405b0b84fb9e7"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"20ab998f737766b3f9aac8faf0f96be90c4eba7c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            #     conditions when a page navigation occurs"},{"line_number":73,"context_line":"            #  2) might leave a user seemingly left logged in forever"},{"line_number":74,"context_line":"            #  3) thrashes db backed session engines with tons of changes"},{"line_number":75,"context_line":"            return"},{"line_number":76,"context_line":"        # If we use cookie-based sessions, check that the cookie size does not"},{"line_number":77,"context_line":"        # reach the max size accepted by common web browsers."},{"line_number":78,"context_line":"        if ("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2F92s%3D","line":75,"updated":"2014-03-12 16:48:31.000000000","message":"same comment here, use \"return None\" instead: https://docs.djangoproject.com/en/dev/topics/http/middleware/#process-request\n\nLooking at the django middleware code, it is returning None for code clarity.","commit_id":"6227ddc64ebb49675458540df9e405b0b84fb9e7"},{"author":{"_account_id":9313,"name":"alejandro emanuel paredes","email":"alejandro.e.paredes@intel.com","username":"aeparede"},"change_message_id":"350596ab18af66332058e378804939c322a7599c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            #     conditions when a page navigation occurs"},{"line_number":73,"context_line":"            #  2) might leave a user seemingly left logged in forever"},{"line_number":74,"context_line":"            #  3) thrashes db backed session engines with tons of changes"},{"line_number":75,"context_line":"            return"},{"line_number":76,"context_line":"        # If we use cookie-based sessions, check that the cookie size does not"},{"line_number":77,"context_line":"        # reach the max size accepted by common web browsers."},{"line_number":78,"context_line":"        if ("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2F0iU%3D","line":75,"in_reply_to":"AAAAWH%2F%2F92s%3D","updated":"2014-03-13 15:47:02.000000000","message":"Hi Eric, I agree on the comment of returning None, why do you think it is not needed?\nTxs!\nAle.","commit_id":"6227ddc64ebb49675458540df9e405b0b84fb9e7"}]}
