)]}'
{"swift/common/middleware/decrypter.py":[{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"7a4f5e6cf09df92aac5ff8db1c391c8459b3c934","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        def add_content_type(response_part):"},{"line_number":282,"context_line":"            ct \u003d HeaderKeyDict(response_part[\"headers\"]).get(\"Content-Type\")"},{"line_number":283,"context_line":"            ct_decrypt \u003d self.decrypt_value(ct, keys[self.server_type], None)"},{"line_number":284,"context_line":"            response_part[\"content_type\"] \u003d ct_decrypt"},{"line_number":285,"context_line":"            return response_part"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_5e22efba","line":283,"updated":"2015-11-21 17:26:38.000000000","message":"This works if the crypto-meta is intact with content-type. Since currently it is not, it returns the same encrypted value.","commit_id":"2abeaaeabcb9a32b56338bf7b479e2b920c759df"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"35e2bd0fd1e44057ee569fe5e18d01f15e575696","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    self.decrypt_value(ct, keys[self.server_type], None)"},{"line_number":296,"context_line":"                yield part"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        final, final2 \u003d itertools.tee(iter_ct(final_iter))"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        # calculate body length and update content-length header"},{"line_number":301,"context_line":"        body_len \u003d {\u0027value\u0027: 0}"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_6a459fb1","line":298,"updated":"2015-11-25 11:12:08.000000000","message":"I am doing this to calculate response body length - see below. Any other refactoring suggestions are welcome.","commit_id":"30fabe6186aa80c42b7f654a0cbca8e5df0b9dd0"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"9ab7bf721b95be5fb86c5be62ccac7a6dc9b8314","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                etag, keys[self.server_type], crypto_meta)))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        # Decrypt content-type"},{"line_number":203,"context_line":"        if not is_multipart:"},{"line_number":204,"context_line":"            ctype \u003d self._response_header_value(\u0027Content-Type\u0027)"},{"line_number":205,"context_line":"            mod_hdr_pairs.append((\u0027Content-Type\u0027, self.decrypt_value("},{"line_number":206,"context_line":"                ctype, keys[self.server_type], None)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa69d971_1a821795","line":203,"updated":"2016-01-04 01:58:18.000000000","message":"it would be easier to rebase on the patch that removes content-type encryption, and then you can remove this type of logic (same for the counterpart in the encrypter).  sorry if you already mentioned plans for doing this ;-)","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8371a96e4832028bf73d6b3e6feb7059bc827d39","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    part_iter \u003d decrypt_part_iter(part, start_byte)"},{"line_number":282,"context_line":"                    yield {\u0027start_byte\u0027: start_byte, \u0027end_byte\u0027: end_byte,"},{"line_number":283,"context_line":"                           \u0027entity_length\u0027: length, \u0027headers\u0027: headers,"},{"line_number":284,"context_line":"                           \u0027part_iter\u0027: part_iter}"},{"line_number":285,"context_line":"            except StopIteration:"},{"line_number":286,"context_line":"                pass"},{"line_number":287,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_8769688e","line":284,"updated":"2015-12-03 04:52:04.000000000","message":"[1] So if I got it correct - instead of collecting these and sending it to document_iters_to_http_response_body in line 309 which reads the whole body to make a http response, you suggest I yield each of these in a proper format and return?","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"de884050dbd472358c2d0df57da841665f56fa63","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    self.decrypt_value(ct, keys[self.server_type], None)"},{"line_number":296,"context_line":"                yield part"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        final, final2 \u003d itertools.tee(iter_ct(final_iter))"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        # calculate body length and update content-length header"},{"line_number":301,"context_line":"        body_len \u003d {\u0027value\u0027: 0}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_9411b806","line":298,"updated":"2015-12-02 15:58:37.000000000","message":"whoa! so this is creating a second iterator of the response body, which is then entirely read in order to calculate the body length?\n\nThat\u0027s doubling the decryption work and the read latency!","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8371a96e4832028bf73d6b3e6feb7059bc827d39","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                    self.decrypt_value(ct, keys[self.server_type], None)"},{"line_number":296,"context_line":"                yield part"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        final, final2 \u003d itertools.tee(iter_ct(final_iter))"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        # calculate body length and update content-length header"},{"line_number":301,"context_line":"        body_len \u003d {\u0027value\u0027: 0}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_bc211f4f","line":298,"in_reply_to":"9a8ffd7b_9411b806","updated":"2015-12-03 04:52:04.000000000","message":"This was more experimental (I particularly called this one out in my first patch upload but forgot to mention in the latest). I wasn\u0027t too sure of the why\u0027s and why not\u0027s of using this, but now it\u0027s clear that its a huge no :)","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"de884050dbd472358c2d0df57da841665f56fa63","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            iter_resp \u003d self.multipart_app_iter(app_resp, content_type_attrs,"},{"line_number":341,"context_line":"                                                keys, mod_resp_headers)"},{"line_number":342,"context_line":"            start_response(self._response_status, mod_resp_headers,"},{"line_number":343,"context_line":"                           self._response_exc_info)"},{"line_number":344,"context_line":"            return iter_resp"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        def iter_response(iterable, crypto_ctxt):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_d7c0a252","line":343,"updated":"2015-12-02 15:58:37.000000000","message":"start_response should only be called once, it was called at line 331","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8371a96e4832028bf73d6b3e6feb7059bc827d39","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            iter_resp \u003d self.multipart_app_iter(app_resp, content_type_attrs,"},{"line_number":341,"context_line":"                                                keys, mod_resp_headers)"},{"line_number":342,"context_line":"            start_response(self._response_status, mod_resp_headers,"},{"line_number":343,"context_line":"                           self._response_exc_info)"},{"line_number":344,"context_line":"            return iter_resp"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        def iter_response(iterable, crypto_ctxt):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_fca7a7b9","line":343,"in_reply_to":"9a8ffd7b_d7c0a252","updated":"2015-12-03 04:52:04.000000000","message":"ok, will modify. Failed to notice that.","commit_id":"19a73e834761001f113072f32fc451ce048de12a"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        returns response body of decrypted mime doc."},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        :param resp: application response"},{"line_number":238,"context_line":"        :param content_type_attrs: attributes extracted from content type"},{"line_number":239,"context_line":"        :param keys: a dict of decryption keys."},{"line_number":240,"context_line":"        :return: http response body containing decrypted mime doc"},{"line_number":241,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_f79e5e62","line":238,"updated":"2016-02-09 18:08:35.000000000","message":"nit: the only attr that is needed here is the boundary. I confess this is purely personal preference and therefore most definitely a nit, but how about just passing boundary into the method i.e. move line 242 to the GET method?","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":237,"context_line":"        :param resp: application response"},{"line_number":238,"context_line":"        :param content_type_attrs: attributes extracted from content type"},{"line_number":239,"context_line":"        :param keys: a dict of decryption keys."},{"line_number":240,"context_line":"        :return: http response body containing decrypted mime doc"},{"line_number":241,"context_line":"        \"\"\""},{"line_number":242,"context_line":"        boundary \u003d dict(content_type_attrs)[\"boundary\"]"},{"line_number":243,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_97ba8a6d","line":240,"updated":"2016-02-09 18:08:35.000000000","message":"return description is wrong - it\u0027s a generator","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":242,"context_line":"        boundary \u003d dict(content_type_attrs)[\"boundary\"]"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        # decrypt multipart-mime body (bytes)"},{"line_number":245,"context_line":"        def decrypt_part_iter(part, offset):"},{"line_number":246,"context_line":"            decrypt_ctxt \u003d self.make_decryption_context(keys, offset)"},{"line_number":247,"context_line":"            for each in part:"},{"line_number":248,"context_line":"                yield decrypt_ctxt.update(each)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_77590e8e","line":245,"updated":"2016-02-09 18:08:35.000000000","message":"not sure another level of generator is needed","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        # decrypt body and construct multipart-mime document"},{"line_number":251,"context_line":"        divider \u003d \"--\" + boundary + \"\\r\\n\""},{"line_number":252,"context_line":"        terminator \u003d \"--\" + boundary + \"--\""},{"line_number":253,"context_line":"        for headers, body in mime_to_document_iters(FileLikeIter(resp),"},{"line_number":254,"context_line":"                                                    boundary):"},{"line_number":255,"context_line":"            first_byte, last_byte, length \u003d parse_content_range("},{"line_number":256,"context_line":"                headers.get(\u0027content-range\u0027))"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_7a25735a","line":253,"updated":"2016-02-09 18:08:35.000000000","message":"need to wrap this with closing_if_possible so that an attempt is made to close the response body once it has been consumed.","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            first_byte, last_byte, length \u003d parse_content_range("},{"line_number":256,"context_line":"                headers.get(\u0027content-range\u0027))"},{"line_number":257,"context_line":"            content_type \u003d headers.get(\u0027content-type\u0027)"},{"line_number":258,"context_line":"            part \u003d (chunk for chunk in iter(lambda: body.read(65536), \u0027\u0027))"},{"line_number":259,"context_line":"            part_dec \u003d decrypt_part_iter(part, first_byte)"},{"line_number":260,"context_line":"            part_header \u003d \u0027\u0027.join(("},{"line_number":261,"context_line":"                divider,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_376876ba","line":258,"updated":"2016-02-09 18:08:35.000000000","message":"so here we create \u0027part\u0027 which is a generator wrapping the iter, then at line 247 iterate over part - why does the iter need to be wrapped in a generator, can\u0027t we just pass iter to decrypt_part_iter?","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":264,"context_line":"                    first_byte, last_byte, length),"},{"line_number":265,"context_line":"                \"\\r\\n\""},{"line_number":266,"context_line":"            ))"},{"line_number":267,"context_line":"            yield part_header"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            for chunk in part_dec:"},{"line_number":270,"context_line":"                yield chunk"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_17b53b7d","line":267,"updated":"2016-02-09 18:08:35.000000000","message":"we ought to allow for other (unknown) headers to be in each part","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        if self.body_crypto_ctxt is None:"},{"line_number":297,"context_line":"            return app_resp"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        if is_multipart:"},{"line_number":300,"context_line":"            iter_resp \u003d self.multipart_resp(app_resp, content_type_attrs,"},{"line_number":301,"context_line":"                                            keys)"},{"line_number":302,"context_line":"            return iter_resp"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_26edb98e","line":299,"updated":"2016-02-09 18:08:35.000000000","message":"nit: could do away with is_multipart and just use\n\n  if content_type \u003d\u003d \u0027multipart/byteranges\u0027:\n\nfor me, that\u0027s less mental gymnastics to follow the logic.","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        if is_multipart:"},{"line_number":300,"context_line":"            iter_resp \u003d self.multipart_resp(app_resp, content_type_attrs,"},{"line_number":301,"context_line":"                                            keys)"},{"line_number":302,"context_line":"            return iter_resp"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        def iter_response(iterable, crypto_ctxt):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_467d55e6","line":301,"updated":"2016-02-09 18:08:35.000000000","message":"nit: line break not needed\n\nand could be just \n\n  return self.multipart_resp(app_resp, content_type_attrs,\n                                            keys)","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"758f945e10c86b055ddc0c2e1b955f597608f6ba","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                yield divider"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"                for header in headers.items():"},{"line_number":252,"context_line":"                    yield \"%s: %s\\r\\n\" % header"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"                yield \"\\r\\n\""},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a57f1b5_67064f22","line":252,"updated":"2016-02-10 07:52:16.000000000","message":"Thank you, the iterating parts look better. But this one, I think that\u0027s how we\u0027re doing for obj server as well using this: https://github.com/openstack/swift/blob/master/swift/common/utils.py#L3539\n\nShould we even change that?","commit_id":"ffe4ba35e505c07ef81f11253a8070491c4f49d1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3e2a9ef479acb1969a4f1734131ebb5023072a5d","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                yield divider"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"                for header in headers.items():"},{"line_number":252,"context_line":"                    yield \"%s: %s\\r\\n\" % header"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"                yield \"\\r\\n\""},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a57f1b5_fd7727d2","line":252,"in_reply_to":"3a57f1b5_67064f22","updated":"2016-02-10 11:23:29.000000000","message":"I see your point, but now that you pointed me to that method I noticed another helper method in utils that we can use here and reduce lines here even more :) (thanks!)\n\nmultipart_byteranges_to_document_iters also does the content-range parsing for us.\n\nThat does require leaving the header processing as it is here since the method returns an iter over the headers. The result is however the same as the code you point to.","commit_id":"ffe4ba35e505c07ef81f11253a8070491c4f49d1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f36e3105afd6cb1bbd366a9ff8ccca5f798df8d0","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        if self.body_crypto_ctxt is None:"},{"line_number":286,"context_line":"            return app_resp"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        if content_type \u003d\u003d \u0027multipart/byteranges\u0027:"},{"line_number":289,"context_line":"            boundary \u003d dict(content_type_attrs)[\"boundary\"]"},{"line_number":290,"context_line":"            return self.multipart_resp(app_resp, boundary, keys)"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3a57f1b5_de2f6286","line":288,"updated":"2016-02-11 19:17:44.000000000","message":"It\u0027s probably better to check self._response_status[:3] \u003d\u003d \u0027206\u0027, in case someone actually wants to store a multipart MIME document.\n\nCome to think of it, ranged SLOs probably have the same issue...","commit_id":"5a9fdbf186f3c371993b6c8230c60d7ccee5b55c"}],"test/unit/common/middleware/test_decrypter.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"db889cc68b39b8e4e455944e499deaa20f10b45e","unresolved":false,"context_lines":[{"line_number":700,"context_line":""},{"line_number":701,"context_line":"@mock.patch(\u0027swift.common.middleware.crypto.Crypto.create_iv\u0027,"},{"line_number":702,"context_line":"            lambda *args: fake_iv())"},{"line_number":703,"context_line":"class TestMultiRangeGet(unittest.TestCase):"},{"line_number":704,"context_line":"    @patch_policies(_test_POLICY)"},{"line_number":705,"context_line":"    def test_get_ranges(self):"},{"line_number":706,"context_line":"        global _test_POLICY"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a57f1b5_aabaeb6c","line":703,"updated":"2016-02-09 18:08:35.000000000","message":"I think this may be overkill - see alternative in next version","commit_id":"c23bd0e95bed8e07fdcee9457ea1ab80751535af"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"758f945e10c86b055ddc0c2e1b955f597608f6ba","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        self.assertEqual(\u0027--multipartboundary--\u0027, resp_lines.pop())"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        # we should have consumed the whole response body"},{"line_number":437,"context_line":"        self.assertFalse(resp_lines)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def test_etag_no_match_on_get(self):"},{"line_number":440,"context_line":"        self.skipTest(\u0027Etag verification not yet implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a57f1b5_27c7f713","line":437,"updated":"2016-02-10 07:52:16.000000000","message":"this looks simpler, but don\u0027t we want to test that the body is decrypted and that we\u0027re parsing the bytes correctly which the other test does?","commit_id":"ffe4ba35e505c07ef81f11253a8070491c4f49d1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3e2a9ef479acb1969a4f1734131ebb5023072a5d","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        self.assertEqual(\u0027--multipartboundary--\u0027, resp_lines.pop())"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"        # we should have consumed the whole response body"},{"line_number":437,"context_line":"        self.assertFalse(resp_lines)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"    def test_etag_no_match_on_get(self):"},{"line_number":440,"context_line":"        self.skipTest(\u0027Etag verification not yet implemented\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a57f1b5_2f46e623","line":437,"in_reply_to":"3a57f1b5_27c7f713","updated":"2016-02-10 11:23:29.000000000","message":"we do - line 433 asserts that each multipart body part is decrypted to the expected range of plaintext","commit_id":"ffe4ba35e505c07ef81f11253a8070491c4f49d1"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"e4c00b180f2c28cb95e538209cd14659a2984cb8","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        env \u003d {\u0027REQUEST_METHOD\u0027: \u0027GET\u0027,"},{"line_number":321,"context_line":"               \u0027swift.crypto.fetch_crypto_keys\u0027: fetch_crypto_keys}"},{"line_number":322,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, environ\u003denv)"},{"line_number":323,"context_line":"        req.headers[\u0027Content-Range\u0027] \u003d \u0027bytes 3-10/17\u0027"},{"line_number":324,"context_line":"        chunks \u003d [\u00270123\u0027, \u002745678\u0027, \u00279abcdef\u0027]"},{"line_number":325,"context_line":"        body \u003d \u0027\u0027.join(chunks)"},{"line_number":326,"context_line":"        key \u003d fetch_crypto_keys()[\u0027object\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_533e32b9","line":323,"updated":"2016-02-11 08:04:59.000000000","message":"I happened to notice that even if we remove this content-range header, this test passes. That is because in line #329 *we* are feeding the ranged parts as body. Am I correct in interpreting that we should change this test?","commit_id":"e2d6ef2f1017462173e8ef3f82ad7e2f80729e3d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4bbcfe72c60332a70e3f2173c880e8e27be8412e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        env \u003d {\u0027REQUEST_METHOD\u0027: \u0027GET\u0027,"},{"line_number":321,"context_line":"               \u0027swift.crypto.fetch_crypto_keys\u0027: fetch_crypto_keys}"},{"line_number":322,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, environ\u003denv)"},{"line_number":323,"context_line":"        req.headers[\u0027Content-Range\u0027] \u003d \u0027bytes 3-10/17\u0027"},{"line_number":324,"context_line":"        chunks \u003d [\u00270123\u0027, \u002745678\u0027, \u00279abcdef\u0027]"},{"line_number":325,"context_line":"        body \u003d \u0027\u0027.join(chunks)"},{"line_number":326,"context_line":"        key \u003d fetch_crypto_keys()[\u0027object\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_78ed3024","line":323,"in_reply_to":"3a57f1b5_533e32b9","updated":"2016-02-11 16:47:30.000000000","message":"Its because we are using FakeSwift so as you say we are telling FakeSwift exactly what body to return and nothing is actually processing the request Content-Range. So in the real world the header is needed, but not needed here. However it does no harm and helps to communicate the intent (i.e. expecting to get bytes 3-10).\n\nI didn\u0027t include it in line 386 - I don\u0027t mind if you want to put it there for consistency, but it makes no difference.","commit_id":"e2d6ef2f1017462173e8ef3f82ad7e2f80729e3d"}]}
