)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"64dee53729325538b194348c5caea489beaf4052","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add tests for HeaderKeyDict"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Test values are converted to bytes type (py3)."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Test init\u0027ing using a dict and another HeaderKeyDict."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9ad45d7e_61f29e07","line":9,"range":{"start_line":9,"start_character":5,"end_line":9,"end_character":45},"updated":"2016-08-11 19:20:52.000000000","message":"This makes me nervous.\n\nFor all of the (great, useful) separation between \"native string\" and \"bytestring\" in the PEP [1][2], the description of response headers [3] doesn\u0027t actually specify which to expect.\n\nJudging by eventlet\u0027s code [4], however, we probably want native strings. From some testing [5], it seems like sending bytestrings will result in headers like\n\n  Content-Length: b\u00271234\u0027\n\nThis gets even more complicated when we consider the requirement that all (native) strings be \"representable in ISO-8859-1 encoding ( \\u0000 through \\u00FF , inclusive)\" [2] while we allow arbitrary UTF-8 data in (say) container metadata. I think we\u0027ll need to intentionally decode bytes using the wrong codec :-(\n\nBut then, maybe we should wait on addressing that until we\u0027ve got a proxy-server that can actually *start* under py3.\n\n[1] https://www.python.org/dev/peps/pep-3333/#a-note-on-string-types\n[2] https://www.python.org/dev/peps/pep-3333/#unicode-issues\n[3] https://www.python.org/dev/peps/pep-3333/#the-start-response-callable\n[4] https://github.com/eventlet/eventlet/blob/v0.19.0/eventlet/wsgi.py#L412-L413\n[5] Simple test:\n\n for interpreter in python python3; do $interpreter \u003c\u003c EOF\nimport os, six, sys\nfp \u003d os.fdopen(sys.stdout.fileno(), \"wb\")\nfp.write(six.b(\"%s\\n\" % b\"foo\"))\nEOF\n done","commit_id":"41900ad163c971214315354d420cd24856d188ef"}],"swift/common/header_key_dict.py":[{"author":{"_account_id":10369,"name":"lokesh s","email":"slokesh184@gmail.com","username":"loki"},"change_message_id":"56d355b9470dcddd6166b91ca158f775e56abce9","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        elif isinstance(value, six.binary_type):"},{"line_number":46,"context_line":"            return dict.__setitem__(self, key.title(), value)"},{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            return dict.__setitem__(self, key.title(), six.b(str(value)))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __contains__(self, key):"},{"line_number":51,"context_line":"        return dict.__contains__(self, key.title())"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_b9118706","line":48,"range":{"start_line":48,"start_character":61,"end_line":48,"end_character":64},"updated":"2016-08-11 11:59:50.000000000","message":"in Python 2, b() returns a 8-bit string. In Python 3, data is encoded with the latin-1 encoding to bytes. So i feel encode to \u0027utf-8\u0027 is better.","commit_id":"41900ad163c971214315354d420cd24856d188ef"},{"author":{"_account_id":10369,"name":"lokesh s","email":"slokesh184@gmail.com","username":"loki"},"change_message_id":"3f3b3d1c5e8df818f4a865da81f4cd56cfc88e72","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        elif isinstance(value, six.binary_type):"},{"line_number":46,"context_line":"            return dict.__setitem__(self, key.title(), value)"},{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            return dict.__setitem__(self, key.title(), six.b(str(value)))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def __contains__(self, key):"},{"line_number":51,"context_line":"        return dict.__contains__(self, key.title())"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_5e9f8c5e","line":48,"range":{"start_line":48,"start_character":61,"end_line":48,"end_character":64},"in_reply_to":"9ad45d7e_b9118706","updated":"2016-08-11 12:56:17.000000000","message":"I updated the patch and added as co-authored. Please let me know if you have any concerns.","commit_id":"41900ad163c971214315354d420cd24856d188ef"}]}
