)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"87e17b4993200c6b2188d96c2c4643c1e2f61dfd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle empty request body with chunked encoding"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baa201ad_e70ceb3d","line":9,"updated":"2014-10-14 18:19:57.000000000","message":"It seems like what this patch is actually doing is limiting the set of allowed transfer-encodings and not adding an additional one.  Is that not true?","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"54e59cf7ae3a595fcc7e39c4602bc33f39807dac","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle empty request body with chunked encoding"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a890539_b3e7b3ab","line":9,"in_reply_to":"baa201ad_e70ceb3d","updated":"2014-12-01 07:48:40.000000000","message":"The bug is that glance assumes any request with \"transfer-encoding\" has a non-empty valid body. Yes, we can just check if the body is empty or not, but i think checking for valid \"transfer-encoding\" value is also important.","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"87e17b4993200c6b2188d96c2c4643c1e2f61dfd","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I54462dad76bdbf7c069ae3031237d98702a77e40"},{"line_number":15,"context_line":"Closes-Bug: #1249501"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baa201ad_0c2596c1","line":12,"updated":"2014-10-14 18:19:57.000000000","message":"It seems like the above part was already there, wasn\u0027t it?","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"5ef1df77eeed1761e698ca3b5e8d848b62289400","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I54462dad76bdbf7c069ae3031237d98702a77e40"},{"line_number":15,"context_line":"Closes-Bug: #1249501"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_e1172543","line":12,"in_reply_to":"3a961159_623cd794","updated":"2015-01-27 07:39:59.000000000","message":"Done","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"af147f91f2e36b5162fd722e42c8ff544d5ab384","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I54462dad76bdbf7c069ae3031237d98702a77e40"},{"line_number":15,"context_line":"Closes-Bug: #1249501"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a961159_623cd794","line":12,"in_reply_to":"5a890539_73946be8","updated":"2014-12-08 01:50:13.000000000","message":"Rohan, yes, your change fixes has_body method to aptly return false when body is empty. However, the check to avoid JSON loading on empty body was already there like John mentioned above. So, your fix helps in avoiding JSON loading. \n\nDoes that make sense? If so, can we drop this from commit message?","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"54e59cf7ae3a595fcc7e39c4602bc33f39807dac","unresolved":false,"context_lines":[{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"* Dont allow JSON loading if body is empty in above case."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I54462dad76bdbf7c069ae3031237d98702a77e40"},{"line_number":15,"context_line":"Closes-Bug: #1249501"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a890539_73946be8","line":12,"in_reply_to":"baa201ad_0c2596c1","updated":"2014-12-01 07:48:40.000000000","message":"No, we were not checking if the body is empty in case \u0027transfer-encoding\u0027 is also given.","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"fa939fca6925056a8d892eec69779a11600d3d6d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle empty request body with chunked encoding"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Identify and handle requests with empty body and \u0027transfer-encoding\u0027 request"},{"line_number":10,"context_line":"  header set to value \u0027chunked\u0027"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I54462dad76bdbf7c069ae3031237d98702a77e40"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa81d914_fc0e8a33","line":9,"updated":"2015-01-28 15:12:53.000000000","message":"Please check that the line length is 72 characters.","commit_id":"b0e0bf8446e694846a20413694c17c124cf75807"}],"glance/common/wsgi.py":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"af147f91f2e36b5162fd722e42c8ff544d5ab384","unresolved":false,"context_lines":[{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        :param request:  Webob.Request object"},{"line_number":537,"context_line":"        \"\"\""},{"line_number":538,"context_line":"        valid_transfer_encoding \u003d [\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027, \u0027gzip\u0027,"},{"line_number":539,"context_line":"                                   \u0027identity\u0027]"},{"line_number":540,"context_line":"        request_encoding \u003d request.headers.get(\u0027transfer-encoding\u0027, \u0027\u0027).lower()"},{"line_number":541,"context_line":"        is_valid_encoding \u003d request_encoding in valid_transfer_encoding"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_e23607e7","line":538,"updated":"2014-12-08 01:50:13.000000000","message":"How about making this a class attribute?","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"5ef1df77eeed1761e698ca3b5e8d848b62289400","unresolved":false,"context_lines":[{"line_number":535,"context_line":""},{"line_number":536,"context_line":"        :param request:  Webob.Request object"},{"line_number":537,"context_line":"        \"\"\""},{"line_number":538,"context_line":"        valid_transfer_encoding \u003d [\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027, \u0027gzip\u0027,"},{"line_number":539,"context_line":"                                   \u0027identity\u0027]"},{"line_number":540,"context_line":"        request_encoding \u003d request.headers.get(\u0027transfer-encoding\u0027, \u0027\u0027).lower()"},{"line_number":541,"context_line":"        is_valid_encoding \u003d request_encoding in valid_transfer_encoding"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_4120f99a","line":538,"in_reply_to":"3a961159_e23607e7","updated":"2015-01-27 07:39:59.000000000","message":"Done","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"8e2d987d310fcd4f16f9f64e278676f499d7c9b8","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"class JSONRequestDeserializer(object):"},{"line_number":574,"context_line":"    valid_transfer_encoding \u003d [\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027,"},{"line_number":575,"context_line":"                               \u0027gzip\u0027, \u0027identity\u0027]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def has_body(self, request):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_f6c18d80","line":574,"updated":"2015-01-27 17:40:08.000000000","message":"This should be a set. If we do this frequently enough, it could be a performance hit to essentially loop over the list instead of lookup in a set.","commit_id":"a1c48a0d777fbd7eb5be548e24eda8dcf3f32bd7"},{"author":{"_account_id":7487,"name":"hzrandd","email":"82433422@qq.com","username":"hzrandd"},"change_message_id":"3e018886626ee6107e877fcdcddb4993e9f1b69a","unresolved":false,"context_lines":[{"line_number":572,"context_line":""},{"line_number":573,"context_line":"class JSONRequestDeserializer(object):"},{"line_number":574,"context_line":"    valid_transfer_encoding \u003d [\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027,"},{"line_number":575,"context_line":"                               \u0027gzip\u0027, \u0027identity\u0027]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def has_body(self, request):"},{"line_number":578,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_7be2bdd6","line":575,"updated":"2015-01-28 02:41:35.000000000","message":"hzrandd\n\nYes,why not frozenset?","commit_id":"a1c48a0d777fbd7eb5be548e24eda8dcf3f32bd7"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"4ccdb2646f94490fbd89509c0f2f7eef88aa462c","unresolved":false,"context_lines":[{"line_number":572,"context_line":""},{"line_number":573,"context_line":"class JSONRequestDeserializer(object):"},{"line_number":574,"context_line":"    valid_transfer_encoding \u003d [\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027,"},{"line_number":575,"context_line":"                               \u0027gzip\u0027, \u0027identity\u0027]"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def has_body(self, request):"},{"line_number":578,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa81d914_9a4bd9af","line":575,"in_reply_to":"fa81d914_7be2bdd6","updated":"2015-01-28 12:27:42.000000000","message":"Done","commit_id":"a1c48a0d777fbd7eb5be548e24eda8dcf3f32bd7"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"fa939fca6925056a8d892eec69779a11600d3d6d","unresolved":false,"context_lines":[{"line_number":572,"context_line":""},{"line_number":573,"context_line":"class JSONRequestDeserializer(object):"},{"line_number":574,"context_line":"    valid_transfer_encoding \u003d frozenset([\u0027chunked\u0027, \u0027compress\u0027, \u0027deflate\u0027,"},{"line_number":575,"context_line":"                                        \u0027gzip\u0027, \u0027identity\u0027])"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def has_body(self, request):"},{"line_number":578,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_fc25aaab","line":575,"updated":"2015-01-28 15:12:53.000000000","message":"I\u0027m surprised this passed the pep8 job. I was relatively certain that this line needed an extra space to be inside the aligned with \u0027chunked\u0027, not the [","commit_id":"b0e0bf8446e694846a20413694c17c124cf75807"},{"author":{"_account_id":14551,"name":"Saba","email":"ahmed.nooras.saba@gmail.com","username":"ansaba"},"change_message_id":"8022f993a240a53dce1910178de3b342c05f9b6a","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        \"\"\""},{"line_number":583,"context_line":"        request_encoding \u003d request.headers.get(\u0027transfer-encoding\u0027, \u0027\u0027).lower()"},{"line_number":584,"context_line":"        is_valid_encoding \u003d request_encoding in self.valid_transfer_encoding"},{"line_number":585,"context_line":"        if is_valid_encoding and request.is_body_readable:"},{"line_number":586,"context_line":"            return True"},{"line_number":587,"context_line":"        elif request.content_length \u003e 0:"},{"line_number":588,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa81d914_632cb9ac","line":585,"updated":"2015-01-28 15:33:40.000000000","message":"This can be made more readable by changing if-elif to \"if with OR\" condition.","commit_id":"b0e0bf8446e694846a20413694c17c124cf75807"}],"glance/tests/unit/common/test_wsgi.py":[{"author":{"_account_id":8443,"name":"Georgy Okrokvertskhov","email":"gokrokvertskhov@mirantis.com","username":"gokrokvertskhov"},"change_message_id":"c7ec09fbdb998562854cf978fa71741faca5bb65","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        expected \u003d {\"body\": {\"key\": \"value\"}}"},{"line_number":371,"context_line":"        self.assertEqual(actual, expected)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_has_body_has_transfer_encoding(self):"},{"line_number":374,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":375,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":376,"context_line":"        request.body \u003d \u0027fake_body\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a890539_4be6b817","line":373,"updated":"2014-12-01 23:23:31.000000000","message":"This test should be rewritten. First it should test that right combination of key:values  like \"Transfer-encoding: chucked\" works correctly.\nThen it is necessary to test that \"Transfer-encoding: blablabla\" returns False.\n\nTest should confirm that valid header \"Transfer-Encoding: chunked, gzip\" will be correctly parsed by nas_body method.\n\nTest should confirm that if there are \"transfer-encoding\" and \"content-length\" headers set it leads to correct behavior of the method. Per RFC Content-length should be ignored.","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"af147f91f2e36b5162fd722e42c8ff544d5ab384","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        expected \u003d {\"body\": {\"key\": \"value\"}}"},{"line_number":371,"context_line":"        self.assertEqual(actual, expected)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_has_body_has_transfer_encoding(self):"},{"line_number":374,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":375,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":376,"context_line":"        request.body \u003d \u0027fake_body\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_42051bc1","line":373,"in_reply_to":"5a890539_4be6b817","updated":"2014-12-08 01:50:13.000000000","message":"+1","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"5ef1df77eeed1761e698ca3b5e8d848b62289400","unresolved":false,"context_lines":[{"line_number":370,"context_line":"        expected \u003d {\"body\": {\"key\": \"value\"}}"},{"line_number":371,"context_line":"        self.assertEqual(actual, expected)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_has_body_has_transfer_encoding(self):"},{"line_number":374,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":375,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":376,"context_line":"        request.body \u003d \u0027fake_body\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_a1527d64","line":373,"in_reply_to":"5a890539_4be6b817","updated":"2015-01-27 07:39:59.000000000","message":"Done","commit_id":"a831f446c9e3bc53c0dfd7fc877366480c3028b0"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"8bca3033266b9801f818588d6bd14be27d3f0bd8","unresolved":false,"context_lines":[{"line_number":459,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":460,"context_line":"        request.body \u003d \u0027fake_body\u0027"},{"line_number":461,"context_line":"        request.headers[\u0027transfer-encoding\u0027] \u003d \u0027chunked, gzip\u0027"},{"line_number":462,"context_line":"        self.assertIn(\u0027transfer-encoding\u0027, request.headers)"},{"line_number":463,"context_line":"        self.assertTrue(wsgi.JSONRequestDeserializer().has_body(request))"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"    def test_has_body_invalid_transfer_encoding(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_7a10b3a8","line":462,"updated":"2015-01-30 02:02:00.000000000","message":"This assertion is redundant as we just set the value above in the test case. Also seen in other tests below.","commit_id":"f912b5c50956728d5992e6fb1c44cf7e63cbc031"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"8bca3033266b9801f818588d6bd14be27d3f0bd8","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        request.headers[\u0027transfer-encoding\u0027] \u003d \u0027invalid\u0027"},{"line_number":479,"context_line":"        request.headers[\u0027content-length\u0027] \u003d 5"},{"line_number":480,"context_line":"        self.assertIn(\u0027transfer-encoding\u0027, request.headers)"},{"line_number":481,"context_line":"        self.assertIn(\u0027content-length\u0027, request.headers)"},{"line_number":482,"context_line":"        self.assertTrue(wsgi.JSONRequestDeserializer().has_body(request))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def test_has_body_valid_transfer_encoding_with_content_length(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa81d914_2efa4f75","line":481,"updated":"2015-01-30 02:02:00.000000000","message":"Same as above.","commit_id":"f912b5c50956728d5992e6fb1c44cf7e63cbc031"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"39eb99a5c92413b50e6bc9cf639b25d9f0ef43df","unresolved":false,"context_lines":[{"line_number":478,"context_line":"        request.headers[\u0027transfer-encoding\u0027] \u003d \u0027invalid\u0027"},{"line_number":479,"context_line":"        request.headers[\u0027content-length\u0027] \u003d 5"},{"line_number":480,"context_line":"        self.assertIn(\u0027transfer-encoding\u0027, request.headers)"},{"line_number":481,"context_line":"        self.assertIn(\u0027content-length\u0027, request.headers)"},{"line_number":482,"context_line":"        self.assertTrue(wsgi.JSONRequestDeserializer().has_body(request))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def test_has_body_valid_transfer_encoding_with_content_length(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_8ebb9b0d","line":481,"in_reply_to":"fa81d914_2efa4f75","updated":"2015-02-02 13:00:13.000000000","message":"Done","commit_id":"f912b5c50956728d5992e6fb1c44cf7e63cbc031"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b67c712f6a4cc2fb4c14fc13f6c6694cb6ba5d26","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        self.assertIn(\u0027content-length\u0027, request.headers)"},{"line_number":482,"context_line":"        self.assertTrue(wsgi.JSONRequestDeserializer().has_body(request))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def test_has_body_valid_transfer_encoding_with_content_length(self):"},{"line_number":485,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":486,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":487,"context_line":"        request.body \u003d \u0027fake_body\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_7412c3b5","line":484,"updated":"2015-02-01 22:36:29.000000000","message":"(nit): There are lots of duplicated code in above three cases. Could you please extract a common method? Cheers.","commit_id":"f912b5c50956728d5992e6fb1c44cf7e63cbc031"},{"author":{"_account_id":6124,"name":"Rohan Kanade","email":"openstack@rohankanade.com","username":"kanaderohan"},"change_message_id":"39eb99a5c92413b50e6bc9cf639b25d9f0ef43df","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        self.assertIn(\u0027content-length\u0027, request.headers)"},{"line_number":482,"context_line":"        self.assertTrue(wsgi.JSONRequestDeserializer().has_body(request))"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def test_has_body_valid_transfer_encoding_with_content_length(self):"},{"line_number":485,"context_line":"        request \u003d wsgi.Request.blank(\u0027/\u0027)"},{"line_number":486,"context_line":"        request.method \u003d \u0027POST\u0027"},{"line_number":487,"context_line":"        request.body \u003d \u0027fake_body\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_6ebe6701","line":484,"in_reply_to":"da86d52c_7412c3b5","updated":"2015-02-02 13:00:13.000000000","message":"Done","commit_id":"f912b5c50956728d5992e6fb1c44cf7e63cbc031"}]}
