{"action":"created","issue":{"url":"https://api.github.com/repos/cloudera/livy/issues/187","repository_url":"https://api.github.com/repos/cloudera/livy","labels_url":"https://api.github.com/repos/cloudera/livy/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/cloudera/livy/issues/187/comments","events_url":"https://api.github.com/repos/cloudera/livy/issues/187/events","html_url":"https://github.com/cloudera/livy/pull/187","id":175012769,"number":187,"title":"LIVY-209. Fix getPathInfo return null issue","user":{"login":"jerryshao","id":850797,"avatar_url":"https://avatars.githubusercontent.com/u/850797?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryshao","html_url":"https://github.com/jerryshao","followers_url":"https://api.github.com/users/jerryshao/followers","following_url":"https://api.github.com/users/jerryshao/following{/other_user}","gists_url":"https://api.github.com/users/jerryshao/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryshao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryshao/subscriptions","organizations_url":"https://api.github.com/users/jerryshao/orgs","repos_url":"https://api.github.com/users/jerryshao/repos","events_url":"https://api.github.com/users/jerryshao/events{/privacy}","received_events_url":"https://api.github.com/users/jerryshao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-05T07:43:17Z","updated_at":"2016-09-07T14:02:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudera/livy/pulls/187","html_url":"https://github.com/cloudera/livy/pull/187","diff_url":"https://github.com/cloudera/livy/pull/187.diff","patch_url":"https://github.com/cloudera/livy/pull/187.patch"},"body":"getPathInfo may return null if there's no path info, this will lead to wrong `location` data in the returning headers, so here fix this.\r\n\r\nTo produce this issue:\r\n\r\n```python\r\n>>> import json, pprint, requests, textwrap\r\n>>> host = 'http://localhost:8998'\r\n>>> data = {'kind': 'spark'}\r\n>>> headers = {'Content-Type': 'application/json'}\r\n>>> r = requests.post(host + '/sessions', data=json.dumps(data), headers=headers)\r\n>>> r.json()\r\n{u'kind': u'spark', u'log': [], u'proxyUser': None, u'state': u'starting', u'appId': None, u'owner': None, u'id': 0}\r\n>>> r.headers['location']\r\n'null/sessions/0'\r\n```\r\n\r\nthe right value should be:\r\n\r\n```python\r\n>>> r.headers['location']\r\n'/sessions/0'\r\n```"},"comment":{"url":"https://api.github.com/repos/cloudera/livy/issues/comments/245290101","html_url":"https://github.com/cloudera/livy/pull/187#issuecomment-245290101","issue_url":"https://api.github.com/repos/cloudera/livy/issues/187","id":245290101,"user":{"login":"tc0312","id":8400790,"avatar_url":"https://avatars.githubusercontent.com/u/8400790?v=3","gravatar_id":"","url":"https://api.github.com/users/tc0312","html_url":"https://github.com/tc0312","followers_url":"https://api.github.com/users/tc0312/followers","following_url":"https://api.github.com/users/tc0312/following{/other_user}","gists_url":"https://api.github.com/users/tc0312/gists{/gist_id}","starred_url":"https://api.github.com/users/tc0312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tc0312/subscriptions","organizations_url":"https://api.github.com/users/tc0312/orgs","repos_url":"https://api.github.com/users/tc0312/repos","events_url":"https://api.github.com/users/tc0312/events{/privacy}","received_events_url":"https://api.github.com/users/tc0312/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T14:02:37Z","updated_at":"2016-09-07T14:02:37Z","body":"LGTM"}}
{"actor":{"display_login":"tc0312"}}