)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"ce3283e8a820646d75af2f849201bfc78f36cf81","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Without this fix, pecan looks at the content type (normally application/json)"},{"line_number":15,"context_line":"and returns an http 406 rather than the more appropriate http 405."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug #1485157"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I4ff640c7bd412b9946797d2da7be04fe78678c63"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_b1c45141","line":16,"updated":"2015-08-16 03:21:35.000000000","message":"The test case is sending Content-Type\u003dapplication/json.\nI tried a request with Content-Type\u003dfoo and got 415 (unsupported media).  406 is something else.","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"0790b128bcc4cf7c99dd1f11d4674d695fdb3c24","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Without this fix, pecan looks at the content type (normally application/json)"},{"line_number":15,"context_line":"and returns an http 406 rather than the more appropriate http 405."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug #1485157"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I4ff640c7bd412b9946797d2da7be04fe78678c63"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_b36c51d1","line":16,"in_reply_to":"1a4dcd0f_b1c45141","updated":"2015-08-16 14:51:29.000000000","message":"Difference between invalid content type and unexpected content type.  If I pass in application/json then pecan sees it as a valid type but unexpected (I believe its looking for test/html).  Since application/json isn\u0027t text/html it fails with the 406.","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"}],"barbican/api/controllers/containers.py":[{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"ce3283e8a820646d75af2f849201bfc78f36cf81","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        d[\u0027creator_id\u0027] \u003d self.container.creator_id"},{"line_number":56,"context_line":"        return \u0027container\u0027, d"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":59,"context_line":"    @utils.allow_all_content_types"},{"line_number":60,"context_line":"    def index(self, **kwargs):"},{"line_number":61,"context_line":"        pecan.abort(405)  # HTTP 405 Method Not Allowed as default"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_f183b901","line":58,"updated":"2015-08-16 03:21:35.000000000","message":"I think a better fix is to add: template\u003d\u0027json\u0027 to the @pecan.expose() line.  I checked and the test cases pass with that change.","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"0790b128bcc4cf7c99dd1f11d4674d695fdb3c24","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        d[\u0027creator_id\u0027] \u003d self.container.creator_id"},{"line_number":56,"context_line":"        return \u0027container\u0027, d"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":59,"context_line":"    @utils.allow_all_content_types"},{"line_number":60,"context_line":"    def index(self, **kwargs):"},{"line_number":61,"context_line":"        pecan.abort(405)  # HTTP 405 Method Not Allowed as default"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_936275d8","line":58,"in_reply_to":"1a4dcd0f_f183b901","updated":"2015-08-16 14:51:29.000000000","message":"I thought about that and I think you\u0027re right.  Will update.","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"},{"author":{"_account_id":11561,"name":"Dave McCowan","email":"dmccowan@cisco.com","username":"dave-mccowan"},"change_message_id":"ce3283e8a820646d75af2f849201bfc78f36cf81","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        return ContainerController(container), remainder"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":126,"context_line":"    @utils.allow_all_content_types"},{"line_number":127,"context_line":"    def index(self, **kwargs):"},{"line_number":128,"context_line":"        pecan.abort(405)  # HTTP 405 Method Not Allowed as default"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_917b5529","line":126,"updated":"2015-08-16 03:21:35.000000000","message":"same here.","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"},{"author":{"_account_id":9234,"name":"Steve Heyman","email":"steve@heyman.com","username":"hockeynut"},"change_message_id":"0790b128bcc4cf7c99dd1f11d4674d695fdb3c24","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        return ContainerController(container), remainder"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @pecan.expose(generic\u003dTrue)"},{"line_number":126,"context_line":"    @utils.allow_all_content_types"},{"line_number":127,"context_line":"    def index(self, **kwargs):"},{"line_number":128,"context_line":"        pecan.abort(405)  # HTTP 405 Method Not Allowed as default"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_336121d4","line":126,"in_reply_to":"1a4dcd0f_917b5529","updated":"2015-08-16 14:51:29.000000000","message":"ditto","commit_id":"b976a4929ed7356fd2d9a76443858ab8880851dd"}]}
