)]}'
{"swift/common/middleware/slo.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9c48f51550c2e9a6fc39bb8600360f2e75ab3afd","unresolved":false,"context_lines":[{"line_number":775,"context_line":"            if header \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":776,"context_line":"                slo_etag \u003d value"},{"line_number":777,"context_line":"            elif header \u003d\u003d SYSMETA_SLO_SIZE:"},{"line_number":778,"context_line":"                slo_size \u003d value"},{"line_number":779,"context_line":"            elif (header \u003d\u003d \u0027x-static-large-object\u0027 and"},{"line_number":780,"context_line":"                  config_true_value(value)):"},{"line_number":781,"context_line":"                slo_marker \u003d value"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4da4fbb9","line":778,"updated":"2019-08-09 15:00:24.000000000","message":"off-topic: we\u0027re doing basically this samething again before we return - at the top of get_or_head_response\n\nthe duplication most likely got introduced when we the optimization was added, maybe we could just make resp_headers an appropriately decorated HeaderKeyDict asap and just pass it through until we return our response...","commit_id":"3ee6de408e8507c8501a9abb17fbf9e08fd65c17"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9c48f51550c2e9a6fc39bb8600360f2e75ab3afd","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                \u0027Etag\u0027: \u0027\"%s\"\u0027 % slo_etag,"},{"line_number":829,"context_line":"                \u0027X-Manifest-Etag\u0027: self._response_header_value(\u0027etag\u0027),"},{"line_number":830,"context_line":"                \u0027Content-Length\u0027: slo_size,"},{"line_number":831,"context_line":"            })"},{"line_number":832,"context_line":"            return resp(req.environ, start_response)"},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"        if self._need_to_refetch_manifest(req):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4dd63b2a","line":831,"updated":"2019-08-09 15:00:24.000000000","message":"There\u0027s obviously a hint here that we could extract and consolidate response header handling to a helper method","commit_id":"3ee6de408e8507c8501a9abb17fbf9e08fd65c17"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9c48f51550c2e9a6fc39bb8600360f2e75ab3afd","unresolved":false,"context_lines":[{"line_number":934,"context_line":"            if lheader \u003d\u003d \u0027etag\u0027:"},{"line_number":935,"context_line":"                response_headers.append((\u0027X-Manifest-Etag\u0027, value))"},{"line_number":936,"context_line":"            elif lheader !\u003d \u0027content-length\u0027:"},{"line_number":937,"context_line":"                response_headers.append((header, value))"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"            if lheader \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":940,"context_line":"                slo_etag \u003d value"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0d5da3e8","line":937,"updated":"2019-08-09 15:00:24.000000000","message":"I have this hang up about an elif w/o an else (i.e. implicit else)\n\nWhat do you think about this:\n\n\tdiff --git a/swift/common/middleware/slo.py b/swift/common/middleware/slo.py\n\tindex 5302d8b33..b0e595180 100644\n\t--- a/swift/common/middleware/slo.py\n\t+++ b/swift/common/middleware/slo.py\n\t@@ -931,9 +931,11 @@ class SloGetContext(WSGIContext):\n\t\t response_headers \u003d []\n\t\t for header, value in resp_headers:\n\t\t     lheader \u003d header.lower()\n\t+            if lheader \u003d\u003d \u0027content-length\u0027:\n\t+                continue\n\t\t     if lheader \u003d\u003d \u0027etag\u0027:\n\t\t\t response_headers.append((\u0027X-Manifest-Etag\u0027, value))\n\t-            elif lheader !\u003d \u0027content-length\u0027:\n\t+            else:\n\t\t\t response_headers.append((header, value))\n\t \n\t\t     if lheader \u003d\u003d SYSMETA_SLO_ETAG:\n\n\n\nI\u0027m not sure it\u0027s even *functionally* equivalent (tests pass), but I find the *intention* more clear?  For example - do we WANT \u0027lheader \u003d\u003d content-length\u0027 to fall through and evaluate in the block below?","commit_id":"3ee6de408e8507c8501a9abb17fbf9e08fd65c17"}]}
