)]}'
{"swift/common/middleware/s3api/s3request.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b7ec4aa8b9df4e5cba772d9b74132718f2669c66","unresolved":true,"context_lines":[{"line_number":861,"context_line":"                    raise BadDigest("},{"line_number":862,"context_line":"                        \u0027The X-Amz-Content-SHA56 you specified did not \u0027"},{"line_number":863,"context_line":"                        \u0027match what we received.\u0027)"},{"line_number":864,"context_line":"                raise"},{"line_number":865,"context_line":"        else:"},{"line_number":866,"context_line":"            # No (or zero) Content-Length provided, and not chunked transfer;"},{"line_number":867,"context_line":"            # no body. Assume zero-length, and enforce a required body below."}],"source_content_type":"text/x-python","patch_set":1,"id":"cb586fce_57f9a7ed","line":864,"updated":"2021-01-07 14:45:03.000000000","message":"just curious why you didn\u0027t change HashingInput to raise BadDigest? AFAICT this is the only place HashingInput is used","commit_id":"22878d8374f7b9ec8f7f5a090879011b9bb2231d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a09e893cfa8ed705663f07a8f143560c35cc9ecf","unresolved":true,"context_lines":[{"line_number":861,"context_line":"                    raise BadDigest("},{"line_number":862,"context_line":"                        \u0027The X-Amz-Content-SHA56 you specified did not \u0027"},{"line_number":863,"context_line":"                        \u0027match what we received.\u0027)"},{"line_number":864,"context_line":"                raise"},{"line_number":865,"context_line":"        else:"},{"line_number":866,"context_line":"            # No (or zero) Content-Length provided, and not chunked transfer;"},{"line_number":867,"context_line":"            # no body. Assume zero-length, and enforce a required body below."}],"source_content_type":"text/x-python","patch_set":1,"id":"749edea8_6a9287eb","line":864,"in_reply_to":"cb586fce_57f9a7ed","updated":"2021-01-07 17:31:21.000000000","message":"So HashingInput is only used for s3api requests -- but the point at which the exception is raised can vary considerably. Here it pops during the read(), still in s3api -- but it can *also* be raised down in the proxy-server app as we\u0027re reading chunks to send to backends. Now the BadDigest should still be an instance of swob.HTTPException -- so it shouldn\u0027t trip a 500 down there or something -- but it seems weird to be raising the s3-style 400 down in the proxy-server; I\u0027m not convinced the middlewares between here and there will handle it appropriately.\n\nEven if they do, the way s3api is written, it\u0027s expecting to translate swift responses to s3responses (over in s3request.py) and I don\u0027t think we have HTTP_BAD_REQUEST in our error map.","commit_id":"22878d8374f7b9ec8f7f5a090879011b9bb2231d"}],"test/unit/common/middleware/s3api/test_multi_upload.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b7ec4aa8b9df4e5cba772d9b74132718f2669c66","unresolved":true,"context_lines":[{"line_number":1076,"context_line":"                     \u0027X-Amz-Content-SHA256\u0027: bad_sha, },"},{"line_number":1077,"context_line":"            body\u003dXML)"},{"line_number":1078,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":1079,"context_line":"        self.assertEqual(\u0027400 Bad Request\u0027, status)"},{"line_number":1080,"context_line":"        self.assertEqual(self._get_error_code(body), \u0027BadDigest\u0027)"},{"line_number":1081,"context_line":""},{"line_number":1082,"context_line":"    def test_object_multipart_upload_upper_sha256(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"14cede25_59478ded","line":1079,"updated":"2021-01-07 14:45:03.000000000","message":"ok. I see a traceback and 500 status code with the fix reverted","commit_id":"22878d8374f7b9ec8f7f5a090879011b9bb2231d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b7ec4aa8b9df4e5cba772d9b74132718f2669c66","unresolved":true,"context_lines":[{"line_number":1096,"context_line":"                     \u0027X-Amz-Content-SHA256\u0027: upper_sha, },"},{"line_number":1097,"context_line":"            body\u003dXML)"},{"line_number":1098,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":1099,"context_line":"        self.assertEqual(\u0027200 OK\u0027, status)"},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"    @patch(\u0027swift.common.middleware.s3api.controllers.multi_upload.time\u0027)"},{"line_number":1102,"context_line":"    def test_object_multipart_upload_complete_with_heartbeat(self, mock_time):"}],"source_content_type":"text/x-python","patch_set":1,"id":"a7405203_1910bf10","line":1099,"updated":"2021-01-07 14:45:03.000000000","message":"ok. traceback and 500 here when fix is reverted","commit_id":"22878d8374f7b9ec8f7f5a090879011b9bb2231d"}]}
