)]}'
{"glance/api/middleware/gzip.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"540346bc68b39c6b990470a3e2c8094c348b56cd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        request \u003d response.request"},{"line_number":40,"context_line":"        accept_encoding \u003d request.headers.get(\u0027Accept-Encoding\u0027, \u0027\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if self.re_zip.search(accept_encoding):"},{"line_number":43,"context_line":"            # NOTE(flaper87): Webob removes the content-md5 when"},{"line_number":44,"context_line":"            # app_iter is called. We\u0027ll keep it and reset it later"},{"line_number":45,"context_line":"            checksum \u003d response.headers.get(\"Content-MD5\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fpp0%3D","line":42,"updated":"2013-04-30 16:28:35.000000000","message":"Is this regex match a bit too forgiving?\n\nWould it be better to require gzip is one element in a comma separated list?\n\ne.g.\n\n  if \u0027gzip\u0027 in [e.strip() for e in accept_encoding.split(\u0027,\u0027) if e.strip() !\u003d \u0027\u0027]:","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"999e9cd5d1144cd48a9c90d5c0c8824a93662b08","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        request \u003d response.request"},{"line_number":40,"context_line":"        accept_encoding \u003d request.headers.get(\u0027Accept-Encoding\u0027, \u0027\u0027)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        if self.re_zip.search(accept_encoding):"},{"line_number":43,"context_line":"            # NOTE(flaper87): Webob removes the content-md5 when"},{"line_number":44,"context_line":"            # app_iter is called. We\u0027ll keep it and reset it later"},{"line_number":45,"context_line":"            checksum \u003d response.headers.get(\"Content-MD5\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FpeA%3D","line":42,"in_reply_to":"AAAAOn%2F%2Fpp0%3D","updated":"2013-04-30 17:22:06.000000000","message":"I used it because the form of the Accept-Encoding might vary. It could a simple string of \u0027,\u0027 separated items or something more complex like:\n\n    Accept-Encoding: gzip;q\u003d1.0, identity; q\u003d0.5, *;q\u003d0","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"540346bc68b39c6b990470a3e2c8094c348b56cd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            checksum \u003d response.headers.get(\"Content-MD5\")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            # Note(flaper87): Using lazy sets"},{"line_number":48,"context_line":"            # content_length to 0, that for, here we check"},{"line_number":49,"context_line":"            # whether we\u0027re sending an image or a smaller"},{"line_number":50,"context_line":"            # response."},{"line_number":51,"context_line":"            content_type \u003d response.headers[\"Content-Type\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fppg%3D","line":48,"updated":"2013-04-30 16:28:35.000000000","message":"Comment is a little hard to parse on a first scan (\"that for\")","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"999e9cd5d1144cd48a9c90d5c0c8824a93662b08","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            checksum \u003d response.headers.get(\"Content-MD5\")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"            # Note(flaper87): Using lazy sets"},{"line_number":48,"context_line":"            # content_length to 0, that for, here we check"},{"line_number":49,"context_line":"            # whether we\u0027re sending an image or a smaller"},{"line_number":50,"context_line":"            # response."},{"line_number":51,"context_line":"            content_type \u003d response.headers[\"Content-Type\"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2Fpdw%3D","line":48,"in_reply_to":"AAAAOn%2F%2Fppg%3D","updated":"2013-04-30 17:22:06.000000000","message":"sorry about that, will re-phrase it","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"540346bc68b39c6b990470a3e2c8094c348b56cd","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            # whether we\u0027re sending an image or a smaller"},{"line_number":50,"context_line":"            # response."},{"line_number":51,"context_line":"            content_type \u003d response.headers[\"Content-Type\"]"},{"line_number":52,"context_line":"            lazy \u003d content_type \u003d\u003d \"application/octet-stream\""},{"line_number":53,"context_line":"            response.encode_content(lazy\u003dlazy)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            if checksum:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FpnI%3D","line":52,"updated":"2013-04-30 16:28:35.000000000","message":"Can you explain the lazy semantics here?\n\nFor example what would be the difference for a really small image versus a response containing just image metadata?\n\nAlso do you need to explicitly handle the zero image length case? (Can occur for snapshot\u0027d volume-backed instances)","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"999e9cd5d1144cd48a9c90d5c0c8824a93662b08","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            # whether we\u0027re sending an image or a smaller"},{"line_number":50,"context_line":"            # response."},{"line_number":51,"context_line":"            content_type \u003d response.headers[\"Content-Type\"]"},{"line_number":52,"context_line":"            lazy \u003d content_type \u003d\u003d \"application/octet-stream\""},{"line_number":53,"context_line":"            response.encode_content(lazy\u003dlazy)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            if checksum:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FpdU%3D","line":52,"in_reply_to":"AAAAOn%2F%2FpnI%3D","updated":"2013-04-30 17:22:06.000000000","message":"Sure, will add a comment about that!\n\nwebob will take care of the zero length bodies.","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"540346bc68b39c6b990470a3e2c8094c348b56cd","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            response.encode_content(lazy\u003dlazy)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            if checksum:"},{"line_number":56,"context_line":"                response.headers[\u0027Content-MD5\u0027] \u003d checksum"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FpqQ%3D","line":56,"updated":"2013-04-30 16:28:35.000000000","message":"Do you also need to set the content-encoding explicitly? i.e.\n\n  response.headers[\u0027Content-Encoding\u0027] \u003d \u0027gzip\u0027\n\nOr is that already handled within the response.encode_content?","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"999e9cd5d1144cd48a9c90d5c0c8824a93662b08","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            response.encode_content(lazy\u003dlazy)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            if checksum:"},{"line_number":56,"context_line":"                response.headers[\u0027Content-MD5\u0027] \u003d checksum"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        return response"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FpdI%3D","line":56,"in_reply_to":"AAAAOn%2F%2FpqQ%3D","updated":"2013-04-30 17:22:06.000000000","message":"no need, webob takes care of that.","commit_id":"1855240e0a9c684d0f47902a2aa8843defe26724"}]}
