)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"cefc7cf7b9fa611be6ce7341d4748630364f04e9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Return HTTP code 406 when the requested resource MIME type in the Accept header is not supported."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When requesting the payload for a secret, if the MIME type specified in the HTTP header is not supported, the curennt behavior is to throw an internal server error, instead of the more appropriate 406."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Id49e63d7f1ae05c5c77f379e5f0f68b7518c58c1"},{"line_number":12,"context_line":"Related-bug: https://bugs.launchpad.net/barbican/+bug/1513555"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_b3917449","line":10,"updated":"2015-11-06 09:43:18.000000000","message":"could you follow the guidelines from this guide for your commit message? http://docs.openstack.org/infra/manual/developers.html#committing-a-change","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"cefc7cf7b9fa611be6ce7341d4748630364f04e9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When requesting the payload for a secret, if the MIME type specified in the HTTP header is not supported, the curennt behavior is to throw an internal server error, instead of the more appropriate 406."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Id49e63d7f1ae05c5c77f379e5f0f68b7518c58c1"},{"line_number":12,"context_line":"Related-bug: https://bugs.launchpad.net/barbican/+bug/1513555"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa80f949_d396783e","line":12,"updated":"2015-11-06 09:43:18.000000000","message":"the same guidelines tell you how to format the bug related flags.","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"}],"barbican/api/controllers/secrets.py":[{"author":{"_account_id":16046,"name":"Fernando Diaz","email":"diazjf@us.ibm.com","username":"diazjf"},"change_message_id":"d557d7a7213b2de2f6f3661fee5b8cd1ad003e9c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from barbican import i18n as u"},{"line_number":26,"context_line":"from barbican.model import models"},{"line_number":27,"context_line":"from barbican.model import repositories as repo"},{"line_number":28,"context_line":"from barbican.plugin.interface import secret_store as s"},{"line_number":29,"context_line":"from barbican.plugin import resources as plugin"},{"line_number":30,"context_line":"from barbican.plugin import util as putil"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_34a73e51","line":28,"updated":"2015-11-06 21:46:11.000000000","message":"s is too vague. Consider changing this.","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":7896,"name":"Edmund Troche","email":"edmund.troche@us.ibm.com","username":"edmund"},"change_message_id":"5afce6b7651c4c79984bca07470db98ca030f283","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        except s.SecretAcceptNotSupportedException:"},{"line_number":173,"context_line":"            pecan.abort("},{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_a5e13b9c","line":175,"updated":"2015-11-05 21:41:03.000000000","message":"Probably should\u0027ve had said \"Accept MIME type {accept_header} is not supported...","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"cefc7cf7b9fa611be6ce7341d4748630364f04e9","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        LOG.info(u._LI(\u0027Retrieved secret payload for project: %s\u0027),"},{"line_number":180,"context_line":"                 external_project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_f3ab7c73","line":177,"updated":"2015-11-06 09:43:18.000000000","message":"uhm... if there is no accept header, I\u0027m thinking the message will not make much sense. Might need a case for that?","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":7896,"name":"Edmund Troche","email":"edmund.troche@us.ibm.com","username":"edmund"},"change_message_id":"a0435f74bbafae0b2fdf415a4fd9430540515a88","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        LOG.info(u._LI(\u0027Retrieved secret payload for project: %s\u0027),"},{"line_number":180,"context_line":"                 external_project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_d8a8c18e","line":177,"in_reply_to":"fa80f949_9898f9c1","updated":"2015-11-06 16:57:43.000000000","message":"BTW, I just realized that the CURL call had no Accept in the request and for some reason it failed, even though we have code to default the accept header, so I\u0027ll have to see why that is the case, maybe we have two different issues that are related.","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":7896,"name":"Edmund Troche","email":"edmund.troche@us.ibm.com","username":"edmund"},"change_message_id":"78a80e7bba8fd435700a279459783693a6103a03","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        LOG.info(u._LI(\u0027Retrieved secret payload for project: %s\u0027),"},{"line_number":180,"context_line":"                 external_project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_f3dfe637","line":177,"in_reply_to":"fa80f949_f3ab7c73","updated":"2015-11-06 17:17:28.000000000","message":"I took a look at this, and we are not putting the default MIME type in the request object, so yes, I need to handle the case where there is no Accept header in the original request. It does beg the question, if we are defaulting the Accept header to application/octet-stream, why not put it in the request object, so that the downstream calls can see that type and handle it accordingly?","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":7896,"name":"Edmund Troche","email":"edmund.troche@us.ibm.com","username":"edmund"},"change_message_id":"703c99ecb299771e539daf05422e1f795c829492","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        LOG.info(u._LI(\u0027Retrieved secret payload for project: %s\u0027),"},{"line_number":180,"context_line":"                 external_project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_9898f9c1","line":177,"in_reply_to":"fa80f949_f3ab7c73","updated":"2015-11-06 16:53:46.000000000","message":"The reason we get the SecretAcceptNotSupportedException is because it checked the Accept header and found that mime_types.is_supported() determines that is not a supported type. We have code that will default the Accept header if is not specified in the request, take a look at the _on_get_secrets_payload() function in api/controllers/secrets.py:\n\n131         # default to application/octet-stream if there is no Accept header\n132         accept_header \u003d getattr(pecan.request.accept, \u0027header_value\u0027,\n133                                 \u0027application/octet-stream\u0027)\n134         pecan.override_template(\u0027\u0027, accept_header)\n135 \n \nTake a look at it and see if I got this right.\n\nEither way I will be changing the actual text message because, as I said in my own comment, it probably should say:\n\n\"The MIME type specified in the Accept header, {accept_header}, is not supported for GET\",\n\nor something like that.","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"},{"author":{"_account_id":7896,"name":"Edmund Troche","email":"edmund.troche@us.ibm.com","username":"edmund"},"change_message_id":"47d83a8463c241c2873f2f1e33715e536584cd14","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                406,"},{"line_number":175,"context_line":"                u._(\"Content-Type of \u0027{accept_header}\u0027 is not supported for \""},{"line_number":176,"context_line":"                    \"GET.\").format(accept_header\u003dpecan.request.accept)"},{"line_number":177,"context_line":"            )"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        LOG.info(u._LI(\u0027Retrieved secret payload for project: %s\u0027),"},{"line_number":180,"context_line":"                 external_project_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_c59bf564","line":177,"in_reply_to":"fa80f949_f3ab7c73","updated":"2015-11-06 17:38:27.000000000","message":"This is the Accept header value that I see when we don\u0027t specify one in the request \"*/*\":\n\nContent-Type of \u0027*/*\u0027 is not supported for GET.","commit_id":"4e9396759bc3fc49399bcef5a29d492a80a233a7"}]}
