)]}'
{"swift/common/middleware/copy.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0f54289ec0337b452d4a6236f54a31475de69e75","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            dest[k] \u003d v"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"# The check_account_format() always returned utf-8, even on py3."},{"line_number":179,"context_line":"def _str(acc):"},{"line_number":180,"context_line":"    if six.PY2:"},{"line_number":181,"context_line":"        return acc"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_42d1aefa","line":178,"updated":"2019-02-14 00:44:32.000000000","message":"...should we just change that? What if check_name_format worked like how swift.common.utils.quote works, and would try to match output type to input type? I feel like that would follow principle of least surprise...","commit_id":"8b7da4eac17e9aca41cad26e5a459df246e77912"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7a74d37ee064962a657468001b1ba6809c7f212d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            dest[k] \u003d v"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"# The check_account_format() always returned utf-8, even on py3."},{"line_number":179,"context_line":"def _str(acc):"},{"line_number":180,"context_line":"    if six.PY2:"},{"line_number":181,"context_line":"        return acc"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_2c3beac8","line":178,"in_reply_to":"9fdfeff1_42d1aefa","updated":"2019-02-19 02:28:06.000000000","message":"You made me review how check_account_format() is used and hoo boy... It\u0027s always either comparison with req.path components or passing it down to environment. It probably wants to be designated as WSGI bytes actually... everywhere except here, in copy.py, where it\u0027s 100% a string.\n\nOne thing I disagree with, is adhering to the input type. In no case callers would be better served by this polymorphy. They always want a fixed definition at the exit.\n\nI\u0027m going to put together an implementation where a native string is returned and see what happens.","commit_id":"8b7da4eac17e9aca41cad26e5a459df246e77912"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0f54289ec0337b452d4a6236f54a31475de69e75","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        dest_account \u003d account"},{"line_number":267,"context_line":"        if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":268,"context_line":"            dest_account \u003d unquote(req.headers.get(\u0027Destination-Account\u0027))"},{"line_number":269,"context_line":"            dest_account \u003d _str(check_account_format(req, dest_account))"},{"line_number":270,"context_line":"            req.headers[\u0027X-Copy-From-Account\u0027] \u003d quote(account)"},{"line_number":271,"context_line":"            account \u003d dest_account"},{"line_number":272,"context_line":"            del req.headers[\u0027Destination-Account\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_22ed8ab6","line":269,"updated":"2019-02-14 00:44:32.000000000","message":"Whoa, wait... so are we talking wsgi or bytes or what? My first guess upon seeing\n\n unquote(req.headers.get(...))\n\nis always that we\u0027re looking at wsgi...","commit_id":"8b7da4eac17e9aca41cad26e5a459df246e77912"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7a74d37ee064962a657468001b1ba6809c7f212d","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        dest_account \u003d account"},{"line_number":267,"context_line":"        if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":268,"context_line":"            dest_account \u003d unquote(req.headers.get(\u0027Destination-Account\u0027))"},{"line_number":269,"context_line":"            dest_account \u003d _str(check_account_format(req, dest_account))"},{"line_number":270,"context_line":"            req.headers[\u0027X-Copy-From-Account\u0027] \u003d quote(account)"},{"line_number":271,"context_line":"            account \u003d dest_account"},{"line_number":272,"context_line":"            del req.headers[\u0027Destination-Account\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_8c98d6cc","line":269,"in_reply_to":"9fdfeff1_22ed8ab6","updated":"2019-02-19 02:28:06.000000000","message":"I thought teader dictionaries were always native strings all around. The environ{} is full of WSGI strings, that\u0027s true. But getters and setters in swob map it... Or so I thought all this time.","commit_id":"8b7da4eac17e9aca41cad26e5a459df246e77912"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"91cdb98153914fb45e12032e92fde15827244048","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        dest_account \u003d account"},{"line_number":267,"context_line":"        if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":268,"context_line":"            dest_account \u003d unquote(req.headers.get(\u0027Destination-Account\u0027))"},{"line_number":269,"context_line":"            dest_account \u003d _str(check_account_format(req, dest_account))"},{"line_number":270,"context_line":"            req.headers[\u0027X-Copy-From-Account\u0027] \u003d quote(account)"},{"line_number":271,"context_line":"            account \u003d dest_account"},{"line_number":272,"context_line":"            del req.headers[\u0027Destination-Account\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_2baadd70","line":269,"in_reply_to":"9fdfeff1_8c98d6cc","updated":"2019-02-19 19:06:16.000000000","message":"Nope, WSGI strings: https://github.com/openstack/swift/blob/2.20.0/swift/common/swob.py#L255 -- in no small part so that third party consumers who have read the WSGI spec aren\u0027t surprised.","commit_id":"8b7da4eac17e9aca41cad26e5a459df246e77912"}]}
