)]}'
{"swift/common/middleware/decrypter.py":[{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"ebdb358b71e6f5b52348c54627c03d2077a8f9cc","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        except StopIteration:"},{"line_number":397,"context_line":"            pass"},{"line_number":398,"context_line":"        finally:"},{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":"            close_method \u003d getattr(body_iter, \u0027close\u0027, None)"},{"line_number":401,"context_line":"            if callable(close_method):"},{"line_number":402,"context_line":"                close_method"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_076dea97","line":399,"updated":"2015-07-20 19:27:54.000000000","message":"any particular reason for the pass statement here?","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"d9bc74e7be3c87b21d7902df875be94c0bf9f67d","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        except StopIteration:"},{"line_number":397,"context_line":"            pass"},{"line_number":398,"context_line":"        finally:"},{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":"            close_method \u003d getattr(body_iter, \u0027close\u0027, None)"},{"line_number":401,"context_line":"            if callable(close_method):"},{"line_number":402,"context_line":"                close_method"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_c88dce32","line":399,"in_reply_to":"3a50d1a3_076dea97","updated":"2015-07-20 20:33:22.000000000","message":"I think it was an accident. The next few lines are indented.  So, I have removed the \"pass\".","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"ebdb358b71e6f5b52348c54627c03d2077a8f9cc","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":"            close_method \u003d getattr(body_iter, \u0027close\u0027, None)"},{"line_number":401,"context_line":"            if callable(close_method):"},{"line_number":402,"context_line":"                close_method"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        # TODO - add etag as well after not using FF"},{"line_number":405,"context_line":"        mod_resp_headers \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_e730fe58","line":402,"updated":"2015-07-20 19:27:54.000000000","message":"This looks like a no-op, did you mean close_method()?","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"d9bc74e7be3c87b21d7902df875be94c0bf9f67d","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            pass"},{"line_number":400,"context_line":"            close_method \u003d getattr(body_iter, \u0027close\u0027, None)"},{"line_number":401,"context_line":"            if callable(close_method):"},{"line_number":402,"context_line":"                close_method"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        # TODO - add etag as well after not using FF"},{"line_number":405,"context_line":"        mod_resp_headers \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_e8768a3d","line":402,"in_reply_to":"3a50d1a3_e730fe58","updated":"2015-07-20 20:33:22.000000000","message":"you are correct.  Done.","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"ebdb358b71e6f5b52348c54627c03d2077a8f9cc","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            finally:"},{"line_number":426,"context_line":"                close_method2 \u003d getattr(iterable, \u0027close\u0027, None)"},{"line_number":427,"context_line":"                if callable(close_method2):"},{"line_number":428,"context_line":"                    close_method2"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        return iter_response(new_body)"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_c712a2b4","line":428,"updated":"2015-07-20 19:27:54.000000000","message":"same as above comment","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"d9bc74e7be3c87b21d7902df875be94c0bf9f67d","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            finally:"},{"line_number":426,"context_line":"                close_method2 \u003d getattr(iterable, \u0027close\u0027, None)"},{"line_number":427,"context_line":"                if callable(close_method2):"},{"line_number":428,"context_line":"                    close_method2"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        return iter_response(new_body)"},{"line_number":431,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_889ee654","line":428,"in_reply_to":"3a50d1a3_c712a2b4","updated":"2015-07-20 20:33:22.000000000","message":"done.  I will also do this in the object context under a previous review in this dependent chain of reviews.","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12974,"name":"Ben Martin","email":"blmartin@us.ibm.com","username":"blmartin"},"change_message_id":"ebdb358b71e6f5b52348c54627c03d2077a8f9cc","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                    return cont_context.handle_head(req, start_response)"},{"line_number":716,"context_line":"            elif path_acc:"},{"line_number":717,"context_line":"                acct_context \u003d DecrypterAcctContext(self)"},{"line_number":718,"context_line":"                if req.method \u003d\u003d \"GET\":"},{"line_number":719,"context_line":"                    return acct_context.handle_head_or_get(req, start_response)"},{"line_number":720,"context_line":"                elif req.method \u003d\u003d \"HEAD\":"},{"line_number":721,"context_line":"                    return acct_context.handle_head_or_get(req, start_response)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_af05ecc2","line":718,"updated":"2015-07-20 19:27:54.000000000","message":"You could simplify the following code into two lines with with: if req.method in [\"GET\", \"HEAD\"]: ....","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"d9bc74e7be3c87b21d7902df875be94c0bf9f67d","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                    return cont_context.handle_head(req, start_response)"},{"line_number":716,"context_line":"            elif path_acc:"},{"line_number":717,"context_line":"                acct_context \u003d DecrypterAcctContext(self)"},{"line_number":718,"context_line":"                if req.method \u003d\u003d \"GET\":"},{"line_number":719,"context_line":"                    return acct_context.handle_head_or_get(req, start_response)"},{"line_number":720,"context_line":"                elif req.method \u003d\u003d \"HEAD\":"},{"line_number":721,"context_line":"                    return acct_context.handle_head_or_get(req, start_response)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_a8b642da","line":718,"in_reply_to":"3a50d1a3_af05ecc2","updated":"2015-07-20 20:33:22.000000000","message":"done.","commit_id":"e04a5f058216cecfdb76658d9af1c6f21cbb5198"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    return crypto_ctxt.update(enc_val)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"class DecrypterContContext(WSGIContext):"},{"line_number":341,"context_line":"    def __init__(self, decrypter):"},{"line_number":342,"context_line":"        super(DecrypterContContext, self).__init__(decrypter.app)"},{"line_number":343,"context_line":"        self.decrypter \u003d decrypter"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_926b7ef1","line":340,"updated":"2015-07-31 17:21:13.000000000","message":"Really minor but move this class below the DecrypterObjContext just for clarity.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            if not is_success(resp_int):"},{"line_number":365,"context_line":"                start_response(self._response_status, mod_resp_headers,"},{"line_number":366,"context_line":"                               self._response_exc_info)"},{"line_number":367,"context_line":"                return app_resp"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        keys \u003d CryptoUtils.get_keys(req.environ)"},{"line_number":370,"context_line":"        out_content_type \u003d get_listing_content_type(req)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_f5bf4c5e","line":367,"updated":"2015-07-31 17:21:13.000000000","message":"So up to this point, the logic above is nearly identical to the objcontext, I wonder if we can make a common section for this (up to this point that is).  Tricky though given we\u0027re calling the respective class process_resp_headers.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                               self._response_exc_info)"},{"line_number":367,"context_line":"                return app_resp"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        keys \u003d CryptoUtils.get_keys(req.environ)"},{"line_number":370,"context_line":"        out_content_type \u003d get_listing_content_type(req)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"        # Pre-process the response body since the content-length will change"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_f772c5af","line":369,"updated":"2015-07-31 17:21:13.000000000","message":"We get the keys as part of processing the headers above, can we find a way to only do it once ?","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        new_total_len \u003d 0"},{"line_number":376,"context_line":"        try:"},{"line_number":377,"context_line":"            chunk \u003d body_iter.next()"},{"line_number":378,"context_line":"            while chunk:"},{"line_number":379,"context_line":"                if out_content_type \u003d\u003d \u0027application/json\u0027:"},{"line_number":380,"context_line":"                    chunk \u003d self.process_json_resp(keys, chunk)"},{"line_number":381,"context_line":"                elif out_content_type.endswith(\u0027/xml\u0027):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_5c71600b","line":378,"updated":"2015-07-31 17:21:13.000000000","message":"Maybe slightly cleaner to push this IF block outside the WHILE loop and create a variable that points to the process_json/xml function.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":458,"context_line":"    def process_xml_resp(self, keys, chunk):"},{"line_number":459,"context_line":"        tree \u003d minidom.parseString(chunk)"},{"line_number":460,"context_line":"        cont \u003d []"},{"line_number":461,"context_line":"        child_nodes \u003d None"},{"line_number":462,"context_line":"        cont_name \u003d \u0027NO_NAME\u0027"},{"line_number":463,"context_line":"        for obj in tree.getElementsByTagName(\u0027container\u0027):"},{"line_number":464,"context_line":"            objects \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_db91f347","line":461,"updated":"2015-07-31 17:21:13.000000000","message":"A high level comment on the XML parsing process may help !","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    def process_resp_headers(self, req):"},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"        # Check for the override now that keymaster has run"},{"line_number":553,"context_line":"        if config_true_value(req.environ.get(\u0027swift.crypto.override\u0027)):"},{"line_number":554,"context_line":"            raise StopEncryption(\"swift.crypto.override override is set\")"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"        # note: no encrypt/decrypt for container content-type"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_b8477b76","line":553,"updated":"2015-07-31 17:21:13.000000000","message":"Minor but does it make more sense for this to live in the parent caller, I know that implies duplication though (i.e. in handle_head / get) but its not really specific to the headers","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":571,"context_line":"                    (\u0027Meta-Access-Control-Allow-Origin\u0027.lower()"},{"line_number":572,"context_line":"                     in hdr.lower()):"},{"line_number":573,"context_line":"                continue"},{"line_number":574,"context_line":"            if is_user_meta(server_type, hdr) and value:"},{"line_number":575,"context_line":"                short_name \u003d strip_user_meta_prefix(server_type, hdr)"},{"line_number":576,"context_line":"                crypto_meta \u003d base64.b64decode(self._response_header_value("},{"line_number":577,"context_line":"                    \u0027X-Container-Sysmeta-Crypto-Meta-\u0027 + short_name))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_37b82d2a","line":574,"updated":"2015-07-31 17:21:13.000000000","message":"The logic below is very similar between the account / container / object handling of the metadata, I wonder if we can combine it into a common function.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"},{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":656,"context_line":""},{"line_number":657,"context_line":"                    # must be decoded and decrypted"},{"line_number":658,"context_line":"                    # It is ok to require having an acct key at this point"},{"line_number":659,"context_line":"                    keys \u003d CryptoUtils.get_keys(req.environ)"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"                    mod_hdr_keys.append(hdr.lower())"},{"line_number":662,"context_line":"                    mod_hdr_pairs.append((hdr, decrypt_header_val("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_9e435913","line":659,"updated":"2015-07-31 17:21:13.000000000","message":"Its Ok to do this earlier correct, right after the app call earlier on ?  If so it\u0027d be nice to have the acct / cont / obj do it in a similar location in each case.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"}],"swift/common/middleware/encrypter.py":[{"author":{"_account_id":17156,"name":"Hamdi Roumani","email":"roumani@ca.ibm.com","username":"hroumani"},"change_message_id":"c596eeabccd27df432a67a26fcef3414a45d9fee","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def handle_request(self, req, start_response):"},{"line_number":162,"context_line":"        keys \u003d CryptoUtils.get_keys(req.environ)"},{"line_number":163,"context_line":"        # Note: no encryption for content-type for acct/cont"},{"line_number":164,"context_line":"        error_response \u003d process_user_metadata(self.encrypter.crypto, req,"},{"line_number":165,"context_line":"                                               keys, \u0027X-\u0027 + self.server_type +"},{"line_number":166,"context_line":"                                               \u0027-Sysmeta-Crypto-Meta-\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a50d1a3_cc15f0e5","line":163,"updated":"2015-07-31 17:21:13.000000000","message":"Minor:  Some may be confused between no encryption for container CT and the X-Backend-Container-Update-Override-Content-Type.  I think it\u0027d be good to clarify but I\u0027m not sure if this is the best place to do it.","commit_id":"ec4229fbb87fa19e18755320f86a6697075c5ca9"}]}
