)]}'
{"glance/common/wsgi.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"2581aba1eee1449fa82f4654afa42dbda6c8f35e","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            # encode all headers in response to utf-8 to prevent unicode errors"},{"line_number":896,"context_line":"            for name, value in list(response.headers.items()):"},{"line_number":897,"context_line":"                if isinstance(value, six.text_type):"},{"line_number":898,"context_line":"                    response.headers[name] \u003d value.encode(\u0027utf-8\u0027)"},{"line_number":899,"context_line":"            return response"},{"line_number":900,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":901,"context_line":"            return translate_exception(request, e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_63e73241","line":898,"updated":"2016-01-18 23:41:43.000000000","message":"Should we use safe_encode from oslo.utils? It  already has all the machinery for py3/py2 and fallback for encoding errors.","commit_id":"c9d63d19d8c17c5a3436382e1e8f6bc1e87f1d6e"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"70edbf14591709ea1e58b9fa2f9c087d91c077f3","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            # encode all headers in response to utf-8 to prevent unicode errors"},{"line_number":896,"context_line":"            for name, value in list(response.headers.items()):"},{"line_number":897,"context_line":"                if isinstance(value, six.text_type):"},{"line_number":898,"context_line":"                    response.headers[name] \u003d value.encode(\u0027utf-8\u0027)"},{"line_number":899,"context_line":"            return response"},{"line_number":900,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":901,"context_line":"            return translate_exception(request, e)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_5388aae7","line":898,"in_reply_to":"ba63e191_63e73241","updated":"2016-01-19 09:16:53.000000000","message":"Yep, let\u0027s use that.","commit_id":"c9d63d19d8c17c5a3436382e1e8f6bc1e87f1d6e"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"bff17f1ff3917fad868031dfb626cd130f02e98e","unresolved":false,"context_lines":[{"line_number":911,"context_line":"            # encode all headers in response to utf-8 to prevent unicode errors"},{"line_number":912,"context_line":"            for name, value in list(response.headers.items()):"},{"line_number":913,"context_line":"                if six.PY2 and isinstance(value, six.text_type):"},{"line_number":914,"context_line":"                    response.headers[name] \u003d encodeutils.safe_encode(value)"},{"line_number":915,"context_line":"            return response"},{"line_number":916,"context_line":"        except webob.exc.WSGIHTTPException as e:"},{"line_number":917,"context_line":"            return translate_exception(request, e)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a57f1b5_a8ca9e6c","line":914,"updated":"2016-02-11 03:10:03.000000000","message":"In theory, it should be safe to just call `safe_encode` every time. It\u0027ll do the required checks for you and return an encoded string.","commit_id":"ba234c1d79a089cacee03fa517a880081b730eb7"}],"glance/tests/unit/common/test_wsgi.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f21e83aaf729bf1ee32413e635ee4d44a5414a75","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def test_response_headers_encoded(self):"},{"line_number":376,"context_line":"        # prepare environment"},{"line_number":377,"context_line":"        for_openstack_comrads \u003d  \\"},{"line_number":378,"context_line":"            u\u0027\\u0417\\u0430 \\u043e\\u043f\\u0435\\u043d\\u0441\\u0442\\u0435\\u043a, \u0027 \\"},{"line_number":379,"context_line":"            u\u0027\\u0442\\u043e\\u0432\\u0430\\u0440\\u0438\\u0449\\u0438\u0027"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_fcece72a","line":377,"range":{"start_line":377,"start_character":8,"end_line":377,"end_character":29},"updated":"2015-12-17 17:15:53.000000000","message":"LOL :) I think you meant \"comrades\", but OK!\n\nЗа опенстек, товарищи","commit_id":"1350525d63fc4a348d0888ef3e6e984c121d1e10"}]}
