)]}'
{"glance/api/middleware/cache.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"04603a87173226a282309b4c377f28dea56f6a07","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                              notifier.Notifier())"},{"line_number":178,"context_line":"        # (flwang): Set the content-type explicitly to be consistent with the"},{"line_number":179,"context_line":"        # non-cached scenario"},{"line_number":180,"context_line":"        response.headers[\u0027content-type\u0027] \u003d \u0027application/octet-stream\u0027"},{"line_number":181,"context_line":"        return response"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def process_response(self, resp):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F%2BG4%3D","line":180,"updated":"2013-07-08 11:00:35.000000000","message":"Hi Fei Long Wang, I means is that IMO we can make a \u0027glance.api.v2.image_data.ResponseSerializer\u0027 instance here and call its \u0027download()\u0027 method to make \u0027response.headers\u0027 correct, this way can take care other header fields also, such as \u0027Content-MD5\u0027. (refer here: https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py#L119).\n\nIn above Line #160, you can see _process_v1_request() use the similar way. Correct me if i\u0027m wrong.","commit_id":"e3f86c450d6d6db9c55e6772b76e7028e20dcaa9"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"fb11c574dc88d08a10a88742561a951c0575024a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                              notifier.Notifier())"},{"line_number":178,"context_line":"        # (flwang): Set the content-type explicitly to be consistent with the"},{"line_number":179,"context_line":"        # non-cached scenario"},{"line_number":180,"context_line":"        response.headers[\u0027content-type\u0027] \u003d \u0027application/octet-stream\u0027"},{"line_number":181,"context_line":"        return response"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def process_response(self, resp):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAP3%2F%2F9TY%3D","line":180,"in_reply_to":"AAAAP3%2F%2F%2BG4%3D","updated":"2013-07-08 15:34:44.000000000","message":"Done. Zhi Yan, thanks for the suggestion.","commit_id":"e3f86c450d6d6db9c55e6772b76e7028e20dcaa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"2c6c2bdbb70e8f4e2322eb8956f46b308602442e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        raw_response \u003d {"},{"line_number":161,"context_line":"            \u0027image_iterator\u0027: image_iterator,"},{"line_number":162,"context_line":"            \u0027image_meta\u0027: image_meta,"},{"line_number":163,"context_line":"        }"},{"line_number":164,"context_line":"        return self.serializer.show(response, raw_response)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _process_v2_request(self, request, image_id, image_iterator):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F9Ro%3D","line":163,"updated":"2013-07-08 15:41:10.000000000","message":"You need update this variable.","commit_id":"03e3f31133131e4fc7d331cd7149da3c5aeb5f34"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6272892e5825361a666bca77fb381ab1d9901bb2","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        image_meta \u003d glance.notifier.format_image_notification(image)"},{"line_number":176,"context_line":"        self._verify_metadata(image_meta)"},{"line_number":177,"context_line":"        response \u003d webob.Response(request\u003drequest)"},{"line_number":178,"context_line":"        response.app_iter \u003d size_checked_iter(response, image_meta,"},{"line_number":179,"context_line":"                                              image_meta[\u0027size\u0027],"},{"line_number":180,"context_line":"                                              image_iterator,"},{"line_number":181,"context_line":"                                              notifier.Notifier())"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F9JU%3D","line":178,"updated":"2013-07-08 16:13:34.000000000","message":"This is a wrong logic IMO, \u0027store.ImageRepoProxy.download()\u0027 will set \u0027response.app_iter\u0027, so notification calls will be lost.","commit_id":"03e3f31133131e4fc7d331cd7149da3c5aeb5f34"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"dcb99a341e04b7ab8fb314397d057e73fc85b802","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                                                       request.context,"},{"line_number":186,"context_line":"                                                       self.store_api)"},{"line_number":187,"context_line":"        image \u003d store_image_repo.get(image_id)"},{"line_number":188,"context_line":"        self.serializer_v2_data.download(response, image)"},{"line_number":189,"context_line":"        return response"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def process_response(self, resp):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F9RQ%3D","line":188,"updated":"2013-07-08 15:44:52.000000000","message":"A quick query: we were using size_checked_iter before to ensure that a notification was raised. Will this patch continue to raise a notification?","commit_id":"03e3f31133131e4fc7d331cd7149da3c5aeb5f34"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"6272892e5825361a666bca77fb381ab1d9901bb2","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                                                       request.context,"},{"line_number":186,"context_line":"                                                       self.store_api)"},{"line_number":187,"context_line":"        image \u003d store_image_repo.get(image_id)"},{"line_number":188,"context_line":"        self.serializer_v2_data.download(response, image)"},{"line_number":189,"context_line":"        return response"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def process_response(self, resp):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2F9LU%3D","line":188,"in_reply_to":"AAAAP3%2F%2F9RQ%3D","updated":"2013-07-08 16:13:34.000000000","message":"Agree, maybe we need that notification also.","commit_id":"03e3f31133131e4fc7d331cd7149da3c5aeb5f34"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"49c2531c17206b17e5c84b10466368ecd92dbcb9","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                                              image_meta[\u0027size\u0027],"},{"line_number":176,"context_line":"                                              image_iterator,"},{"line_number":177,"context_line":"                                              notifier.Notifier())"},{"line_number":178,"context_line":"        # (flwang): Set the content-type, content-md5 and content-length"},{"line_number":179,"context_line":"        # explicitly to be consistent with the non-cache scenario."},{"line_number":180,"context_line":"        # Besides, it\u0027s not worth the candle to invoke the \"download\" method"},{"line_number":181,"context_line":"        # of ResponseSerializer under image_data. Because method \"download\""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2F1QI%3D","line":178,"updated":"2013-07-10 18:26:22.000000000","message":"nitpick: It should be NOTE(flwang)","commit_id":"4e5ce3a2d02b8935e64b432c4691e84d976ca102"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"0000393c8466c749b843c4489d46627583403443","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # \"size_checked_iter\" to avoid missing any notification. But after"},{"line_number":184,"context_line":"        # call \"size_checked_iter\", we will lose the content-md5 and"},{"line_number":185,"context_line":"        # content-length got by the method \"download\" because of this issue:"},{"line_number":186,"context_line":"        # https://github.com/Pylons/webob/issues/86"},{"line_number":187,"context_line":"        response.headers[\u0027Content-Type\u0027] \u003d \u0027application/octet-stream\u0027"},{"line_number":188,"context_line":"        response.headers[\u0027Content-MD5\u0027] \u003d image.checksum"},{"line_number":189,"context_line":"        response.headers[\u0027Content-Length\u0027] \u003d str(image.size)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAP3%2F%2F66o%3D","line":186,"updated":"2013-07-09 06:51:19.000000000","message":"Oh, it\u0027s a bug: https://bugs.launchpad.net/ubuntu/+source/python-webob/+bug/1083155\n\nOk, seems we can only use this awkward way to set those headers. When defect #1083155 be resolved later, I think we\u0027d better change this to use image \u0027glance.api.v2.image_data.ResponseSerializer.download()\u0027 to reduce these duplicated code, just like \u0027_process_v1_request()\u0027 did, IMO.","commit_id":"4e5ce3a2d02b8935e64b432c4691e84d976ca102"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"db055341bac93efb454c12851a37d16ccad7181c","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                              notifier.Notifier())"},{"line_number":178,"context_line":"        # NOTE (flwang): Set the content-type, content-md5 and content-length"},{"line_number":179,"context_line":"        # explicitly to be consistent with the non-cache scenario."},{"line_number":180,"context_line":"        # Besides, it\u0027s not worth the candle to invoke the \"download\" method"},{"line_number":181,"context_line":"        # of ResponseSerializer under image_data. Because method \"download\""},{"line_number":182,"context_line":"        # will reset the app_iter. Then we have to call method"},{"line_number":183,"context_line":"        # \"size_checked_iter\" to avoid missing any notification. But after"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FwJM%3D","line":180,"updated":"2013-07-11 23:07:56.000000000","message":"I think we can get away with just lines 178 and 179 of the comment here.","commit_id":"5e71b5e11f056fc082e61e0e3a4515fcf1b9948f"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"d9871957cf0c9153a761cb9e5e56f224712b75ff","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                              notifier.Notifier())"},{"line_number":178,"context_line":"        # NOTE (flwang): Set the content-type, content-md5 and content-length"},{"line_number":179,"context_line":"        # explicitly to be consistent with the non-cache scenario."},{"line_number":180,"context_line":"        # Besides, it\u0027s not worth the candle to invoke the \"download\" method"},{"line_number":181,"context_line":"        # of ResponseSerializer under image_data. Because method \"download\""},{"line_number":182,"context_line":"        # will reset the app_iter. Then we have to call method"},{"line_number":183,"context_line":"        # \"size_checked_iter\" to avoid missing any notification. But after"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FwJA%3D","line":180,"in_reply_to":"AAAAP3%2F%2FwJM%3D","updated":"2013-07-12 07:33:43.000000000","message":"I actually would like to keep line 186 also for reference.","commit_id":"5e71b5e11f056fc082e61e0e3a4515fcf1b9948f"}]}
