)]}'
{"swiftclient/client.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2bbdc3286fce7debaaf51c01bfd453684cc22704","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        self.obj \u003d obj"},{"line_number":303,"context_line":"        self.query_string \u003d query_string"},{"line_number":304,"context_line":"        self.response_dict \u003d response_dict"},{"line_number":305,"context_line":"        self.headers \u003d headers if headers is not None else {}"},{"line_number":306,"context_line":"        self.bytes_read \u003d 0"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def read(self, length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_f3068d86","side":"PARENT","line":305,"updated":"2017-08-25 19:38:32.000000000","message":"this looks strangely idiomatic to me, i\u0027m not sure the client didn\u0027t mean literally \"use *these* headers\" right here (vs. use a copy or proximity of this hash-map-like of k/v pairs)","commit_id":"f323bb4824d98e74fdd5e357526ce678d0f7d45a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8fd29a3641c920dd1398dfc3de0910218409799d","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        self.obj \u003d obj"},{"line_number":303,"context_line":"        self.query_string \u003d query_string"},{"line_number":304,"context_line":"        self.response_dict \u003d response_dict"},{"line_number":305,"context_line":"        self.headers \u003d headers if headers is not None else {}"},{"line_number":306,"context_line":"        self.bytes_read \u003d 0"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def read(self, length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_1355991d","side":"PARENT","line":305,"in_reply_to":"7f287b81_f3068d86","updated":"2017-08-25 19:52:07.000000000","message":"*shrug* We could probably get away with *not* doing this one -- _RetryBody gets used in get_object, so we\u0027d only be messing with the already-copied version. But it still seemed weird to me that we could mutate a header dict as a result of a retry while you\u0027re iterating over the result.","commit_id":"f323bb4824d98e74fdd5e357526ce678d0f7d45a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2bbdc3286fce7debaaf51c01bfd453684cc22704","unresolved":false,"context_lines":[{"line_number":883,"context_line":"    if not http_conn:"},{"line_number":884,"context_line":"        http_conn \u003d http_connection(url)"},{"line_number":885,"context_line":"    if headers:"},{"line_number":886,"context_line":"        headers \u003d dict(headers)"},{"line_number":887,"context_line":"    else:"},{"line_number":888,"context_line":"        headers \u003d {}"},{"line_number":889,"context_line":"    headers[\u0027X-Auth-Token\u0027] \u003d token"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_b335a548","side":"PARENT","line":886,"updated":"2017-08-25 19:38:32.000000000","message":"oh, interesting, get_container makes a copy...","commit_id":"f323bb4824d98e74fdd5e357526ce678d0f7d45a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2bbdc3286fce7debaaf51c01bfd453684cc22704","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        self.obj \u003d obj"},{"line_number":303,"context_line":"        self.query_string \u003d query_string"},{"line_number":304,"context_line":"        self.response_dict \u003d response_dict"},{"line_number":305,"context_line":"        self.headers \u003d dict(headers) if headers is not None else {}"},{"line_number":306,"context_line":"        self.bytes_read \u003d 0"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def read(self, length\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_13d6b9f2","line":305,"updated":"2017-08-25 19:38:32.000000000","message":"I wonder if there\u0027s any kind of \"dict-like\" that we loose fidelity on... case sensitivity?  multi-value?","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2bbdc3286fce7debaaf51c01bfd453684cc22704","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"    if service_token:"},{"line_number":1009,"context_line":"        req_headers[\u0027X-Service-Token\u0027] \u003d service_token"},{"line_number":1010,"context_line":"    if headers:"},{"line_number":1011,"context_line":"        req_headers.update(headers)"},{"line_number":1012,"context_line":"    if \u0027content-length\u0027 not in (k.lower() for k in req_headers):"},{"line_number":1013,"context_line":"        req_headers[\u0027Content-Length\u0027] \u003d \u00270\u0027"},{"line_number":1014,"context_line":"    if query_string:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_53232106","line":1011,"updated":"2017-08-25 19:38:32.000000000","message":"but... *should* headers[\u0027x-service-token\u0027] trump service_token kwarg?  idk...","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8fd29a3641c920dd1398dfc3de0910218409799d","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"    if service_token:"},{"line_number":1009,"context_line":"        req_headers[\u0027X-Service-Token\u0027] \u003d service_token"},{"line_number":1010,"context_line":"    if headers:"},{"line_number":1011,"context_line":"        req_headers.update(headers)"},{"line_number":1012,"context_line":"    if \u0027content-length\u0027 not in (k.lower() for k in req_headers):"},{"line_number":1013,"context_line":"        req_headers[\u0027Content-Length\u0027] \u003d \u00270\u0027"},{"line_number":1014,"context_line":"    if query_string:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_93a2a94a","line":1011,"in_reply_to":"7f287b81_53232106","updated":"2017-08-25 19:52:07.000000000","message":"It *already does*, and it seems reasonable. I feel like the swiftclient.Connection *should* be managing the various tokens.","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9c719279e57640660680c01a6fc880da48b0a09d","unresolved":false,"context_lines":[{"line_number":1008,"context_line":"    if service_token:"},{"line_number":1009,"context_line":"        req_headers[\u0027X-Service-Token\u0027] \u003d service_token"},{"line_number":1010,"context_line":"    if headers:"},{"line_number":1011,"context_line":"        req_headers.update(headers)"},{"line_number":1012,"context_line":"    if \u0027content-length\u0027 not in (k.lower() for k in req_headers):"},{"line_number":1013,"context_line":"        req_headers[\u0027Content-Length\u0027] \u003d \u00270\u0027"},{"line_number":1014,"context_line":"    if query_string:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_16be74d4","line":1011,"in_reply_to":"7f287b81_93a2a94a","updated":"2018-04-12 20:28:43.000000000","message":"In my reading we *would have* taken the given headers and if we got a service_token we would indiscriminately overwrite anything that *might* have been passed in as:\n\n    headers\u003d{\u0027X-Service-Token\u0027: \u0027not-this-one\u0027}, service_token\u003d\u0027use-this-one\u0027\n\nQuite possible I\u0027m misreading, but I believe preparing req_headers before calling req_headers.update(headers) would reverse that preference.\n\nI\u0027m not sure what I\u0027m missing.","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"}],"tests/unit/test_swiftclient.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2bbdc3286fce7debaaf51c01bfd453684cc22704","unresolved":false,"context_lines":[{"line_number":3019,"context_line":"                             actual[\u0027full_path\u0027])"},{"line_number":3020,"context_line":"        self.assertEqual(conn.attempts, 1)"},{"line_number":3021,"context_line":"        # Check that we didn\u0027t mutate the request header dict"},{"line_number":3022,"context_line":"        self.assertEqual(headers, {\u0027X-Container-Meta-Color\u0027: \u0027blue\u0027})"},{"line_number":3023,"context_line":""},{"line_number":3024,"context_line":"    def test_service_token_put_container(self):"},{"line_number":3025,"context_line":"        with mock.patch(\u0027swiftclient.client.http_connection\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_f3b8cdc8","line":3022,"updated":"2017-08-25 19:38:32.000000000","message":"well I\u0027m at least glad we didn\u0027t have any tests that were expecting this behavior.","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8fd29a3641c920dd1398dfc3de0910218409799d","unresolved":false,"context_lines":[{"line_number":3019,"context_line":"                             actual[\u0027full_path\u0027])"},{"line_number":3020,"context_line":"        self.assertEqual(conn.attempts, 1)"},{"line_number":3021,"context_line":"        # Check that we didn\u0027t mutate the request header dict"},{"line_number":3022,"context_line":"        self.assertEqual(headers, {\u0027X-Container-Meta-Color\u0027: \u0027blue\u0027})"},{"line_number":3023,"context_line":""},{"line_number":3024,"context_line":"    def test_service_token_put_container(self):"},{"line_number":3025,"context_line":"        with mock.patch(\u0027swiftclient.client.http_connection\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_d31dd173","line":3022,"in_reply_to":"7f287b81_f3b8cdc8","updated":"2017-08-25 19:52:07.000000000","message":"I\u0027d think that if anyone proposed a test that codified the previous behavior, any reviewer would\u0027ve said \"No, that\u0027s clearly a bug. If you really *want* the token, just go grab conn.token\"","commit_id":"ae5fd46e8772e50a0ab2ac89216188b1cdc83d8e"}]}
