{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22442","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22442/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22442/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22442/events","html_url":"https://github.com/saltstack/salt/issues/22442","id":67006099,"number":22442,"title":"rest_cherrypy /keys URL does not handle JSON requests","user":{"login":"allanliu","id":3030664,"avatar_url":"https://avatars.githubusercontent.com/u/3030664?v=3","gravatar_id":"","url":"https://api.github.com/users/allanliu","html_url":"https://github.com/allanliu","followers_url":"https://api.github.com/users/allanliu/followers","following_url":"https://api.github.com/users/allanliu/following{/other_user}","gists_url":"https://api.github.com/users/allanliu/gists{/gist_id}","starred_url":"https://api.github.com/users/allanliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanliu/subscriptions","organizations_url":"https://api.github.com/users/allanliu/orgs","repos_url":"https://api.github.com/users/allanliu/repos","events_url":"https://api.github.com/users/allanliu/events{/privacy}","received_events_url":"https://api.github.com/users/allanliu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P2","name":"P2","color":"155fb5"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-API","name":"Salt-API","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2697,"closed_issues":2919,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-11-14T07:18:14Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-04-07T22:41:22Z","updated_at":"2015-11-14T07:18:57Z","closed_at":null,"body":"Salt-Master Version: 2014.7.1\r\nMaster OS: CentOs-6 \r\nSalt-Minion Version: \r\nMinion OS: Ubuntu 14.04 LTS\r\nCherryPy Version: 3.2.2\r\n\r\nWhen trying to make a POST to the 'keys' endpoint on the master from a new minion (trying to create a preseeded minion key), I get a 404 back stating a missing 'mid' parameter.\r\n\r\nHowever, the parameter is there:\r\n\r\n```\r\n>>> print r.request.body\r\n{\"username\": \"textures\", \"password\": \"testpasswd\", \"mid\": \"ip-100-100-100-233\", \"eauth\": \"pam\"}\r\n>>>\r\n>>> print r.content\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html>\r\n<head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></meta>\r\n    <title>404 Not Found</title>\r\n    <style type=\"text/css\">\r\n    #powered_by {\r\n        margin-top: 20px;\r\n        border-top: 2px solid black;\r\n        font-style: italic;\r\n    }\r\n\r\n    #traceback {\r\n        color: red;\r\n    }\r\n    </style>\r\n</head>\r\n    <body>\r\n        <h2>404 Not Found</h2>\r\n        <p>Missing parameters: mid</p>\r\n        <pre id=\"traceback\">Traceback (most recent call last):\r\n  File \"/usr/lib/python2.6/site-packages/cherrypy/_cprequest.py\", line 656, in respond\r\n    response.body = self.handler()\r\n  File \"/usr/lib/python2.6/site-packages/cherrypy/lib/encoding.py\", line 188, in __call__\r\n    self.body = self.oldhandler(*args, **kwargs)\r\n  File \"/usr/lib/python2.6/site-packages/cherrypy/_cpdispatch.py\", line 40, in __call__\r\n    raise sys.exc_info()[1]\r\nHTTPError: (404, 'Missing parameters: mid')\r\n</pre>\r\n    <div id=\"powered_by\">\r\n    <span>Powered by <a href=\"http://www.cherrypy.org\">CherryPy 3.2.2</a></span>\r\n    </div>\r\n    </body>\r\n</html>\r\n```\r\n\r\nHere's the request header if needed:\r\n\r\n```\r\n>>> print r.request.headers\r\n{'Content-Length': '89', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'User-Agent': 'python-requests/2.6.0 CPython/2.7.6 Linux/3.13.0-44-generic', 'Connection': 'keep-alive', 'X-Auth-Token': u'67779cc7f3411d7acbe10ee9125376feb9b8dcd1', 'Content-Type': 'application/json'}\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/156661123","html_url":"https://github.com/saltstack/salt/issues/22442#issuecomment-156661123","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22442","id":156661123,"user":{"login":"dmyerscough","id":1395617,"avatar_url":"https://avatars.githubusercontent.com/u/1395617?v=3","gravatar_id":"","url":"https://api.github.com/users/dmyerscough","html_url":"https://github.com/dmyerscough","followers_url":"https://api.github.com/users/dmyerscough/followers","following_url":"https://api.github.com/users/dmyerscough/following{/other_user}","gists_url":"https://api.github.com/users/dmyerscough/gists{/gist_id}","starred_url":"https://api.github.com/users/dmyerscough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmyerscough/subscriptions","organizations_url":"https://api.github.com/users/dmyerscough/orgs","repos_url":"https://api.github.com/users/dmyerscough/repos","events_url":"https://api.github.com/users/dmyerscough/events{/privacy}","received_events_url":"https://api.github.com/users/dmyerscough/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T07:18:57Z","updated_at":"2015-11-14T07:18:57Z","body":"This can be closed :+1: "}}