)]}'
{"swift/common/middleware/container_quotas.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0d40b74ceba3c89332698475f974d6e932bf174a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    version, account, dest)"},{"line_number":92,"context_line":"                container_info \u003d get_container_info("},{"line_number":93,"context_line":"                    req.environ, self.app, swift_source\u003d\u0027CQ\u0027)"},{"line_number":94,"context_line":"                req.environ[\u0027PATH_INFO\u0027] \u003d path_info"},{"line_number":95,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":96,"context_line":"                # this will hopefully 404 later"},{"line_number":97,"context_line":"                return self.app"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9dTs%3D","line":94,"updated":"2013-12-11 10:19:36.000000000","message":"Maybe use a temporary copy of req.environ, so that you don\u0027t have to remember the original value and restore it after get_container_info? Like:\n\ntmp_env \u003d req.environ\ntmp_env[\u0027PATH_INFO\u0027] \u003d ...\ncontainer_info \u003d get_container_info(tmp_env, ...\n\nMight need a copy though...","commit_id":"30faa595e4d4a73fcee48a663654086c0f1abe73"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"678e7686646c448f94f5f835444cb676c3c4d9be","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    version, account, dest)"},{"line_number":92,"context_line":"                container_info \u003d get_container_info("},{"line_number":93,"context_line":"                    req.environ, self.app, swift_source\u003d\u0027CQ\u0027)"},{"line_number":94,"context_line":"                req.environ[\u0027PATH_INFO\u0027] \u003d path_info"},{"line_number":95,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":96,"context_line":"                # this will hopefully 404 later"},{"line_number":97,"context_line":"                return self.app"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9Sr4%3D","line":94,"updated":"2013-12-12 23:36:54.000000000","message":"This mostly looks good to me; the one thing I\u0027d like to see here is wrapping a try/finally around the PATH_INFO changing. That way, if get_container_info() does blow up, any exception logging can at least log the real path.","commit_id":"30faa595e4d4a73fcee48a663654086c0f1abe73"},{"author":{"_account_id":6889,"name":"Fabien Boucher","email":"fboucher@redhat.com","username":"fabien-boucher"},"change_message_id":"ef0d96cf29937ad4f2b89dd4ab1fec10a318b2b7","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                    version, account, dest)"},{"line_number":92,"context_line":"                container_info \u003d get_container_info("},{"line_number":93,"context_line":"                    req.environ, self.app, swift_source\u003d\u0027CQ\u0027)"},{"line_number":94,"context_line":"                req.environ[\u0027PATH_INFO\u0027] \u003d path_info"},{"line_number":95,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":96,"context_line":"                # this will hopefully 404 later"},{"line_number":97,"context_line":"                return self.app"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATn%2F9WX0%3D","line":94,"in_reply_to":"AAAATn%2F9dTs%3D","updated":"2013-12-12 11:54:12.000000000","message":"Hi I\u0027ve done like that to be able to keep the cached infos of the container (Destination container of the COPY) in the original request env. If I use a copy a the full env we will lost the container infos cached by get_container_info.","commit_id":"30faa595e4d4a73fcee48a663654086c0f1abe73"}]}
