{"action":"created","comment":{"url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/comments/26721880","id":26721880,"diff_hunk":"@@ -0,0 +1,70 @@\n+from __future__ import unicode_literals\n+import socket as s\n+\n+\n+def response_ok(uri):\n+    '''Will return a 200 OK response.'''\n+    response = []\n+    response.append('HTTP/1.1 200 OK')\n+    response.append('Content-Type = text/html; charset=utf-8')\n+    response.append('')\n+    response.append(uri)\n+    response = '\\r\\n'.join(response).encode('utf-8')  # Force utf-8\n+    return response\n+\n+\n+def response_error(error, message):\n+    '''Will return an error response.'''\n+    response = []\n+    response.append('HTTP/1.1 {} {}'.format(error, message))\n+    response.append('Content-Type = text/html; charset=utf-8')\n+    response.append('')\n+    response.append('{} {}'.format(error, message))\n+    response = '\\r\\n'.join(response).encode('utf-8')  # Force utf-8\n+    return response\n+\n+\n+def parse_request(request):\n+    '''Will parse an HTTP request and return the requested URI.'''\n+    input = request.splitlines()[0].split(' ')","path":"server.py","position":29,"original_position":29,"commit_id":"3bee905b295e600204af945b11b592b95ab9f070","original_commit_id":"3bee905b295e600204af945b11b592b95ab9f070","user":{"login":"cewing","id":417109,"avatar_url":"https://avatars.githubusercontent.com/u/417109?v=3","gravatar_id":"","url":"https://api.github.com/users/cewing","html_url":"https://github.com/cewing","followers_url":"https://api.github.com/users/cewing/followers","following_url":"https://api.github.com/users/cewing/following{/other_user}","gists_url":"https://api.github.com/users/cewing/gists{/gist_id}","starred_url":"https://api.github.com/users/cewing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cewing/subscriptions","organizations_url":"https://api.github.com/users/cewing/orgs","repos_url":"https://api.github.com/users/cewing/repos","events_url":"https://api.github.com/users/cewing/events{/privacy}","received_events_url":"https://api.github.com/users/cewing/received_events","type":"User","site_admin":false},"body":"watch out for this.  If there's more than one space between your values, you'll end up with unexpected results:\r\n\r\n```python\r\n>>> \"this has  extra   spaces\".split(' ')\r\n['this', 'has', '', 'extra', '', '', 'spaces']\r\n>>> \"this has  extra   spaces\".split()\r\n['this', 'has', 'extra', 'spaces']\r\n```","created_at":"2015-03-19T00:42:55Z","updated_at":"2015-03-19T00:42:55Z","html_url":"https://github.com/jacquestardie/network-tools/pull/2#discussion_r26721880","pull_request_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/comments/26721880"},"html":{"href":"https://github.com/jacquestardie/network-tools/pull/2#discussion_r26721880"},"pull_request":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2","id":30730803,"html_url":"https://github.com/jacquestardie/network-tools/pull/2","diff_url":"https://github.com/jacquestardie/network-tools/pull/2.diff","patch_url":"https://github.com/jacquestardie/network-tools/pull/2.patch","issue_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/2","number":2,"state":"open","locked":false,"title":"Http1","user":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"body":"Ended up starting from scratch.","created_at":"2015-03-09T01:12:42Z","updated_at":"2015-03-19T00:42:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"413b23c970873932d166112253b9d56c546d023e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/2/comments","statuses_url":"https://api.github.com/repos/jacquestardie/network-tools/statuses/3bee905b295e600204af945b11b592b95ab9f070","head":{"label":"jacquestardie:http1","ref":"http1","sha":"3bee905b295e600204af945b11b592b95ab9f070","user":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"repo":{"id":30816897,"name":"network-tools","full_name":"jacquestardie/network-tools","owner":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacquestardie/network-tools","description":"","fork":false,"url":"https://api.github.com/repos/jacquestardie/network-tools","forks_url":"https://api.github.com/repos/jacquestardie/network-tools/forks","keys_url":"https://api.github.com/repos/jacquestardie/network-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacquestardie/network-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacquestardie/network-tools/teams","hooks_url":"https://api.github.com/repos/jacquestardie/network-tools/hooks","issue_events_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/events{/number}","events_url":"https://api.github.com/repos/jacquestardie/network-tools/events","assignees_url":"https://api.github.com/repos/jacquestardie/network-tools/assignees{/user}","branches_url":"https://api.github.com/repos/jacquestardie/network-tools/branches{/branch}","tags_url":"https://api.github.com/repos/jacquestardie/network-tools/tags","blobs_url":"https://api.github.com/repos/jacquestardie/network-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacquestardie/network-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacquestardie/network-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacquestardie/network-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacquestardie/network-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/jacquestardie/network-tools/languages","stargazers_url":"https://api.github.com/repos/jacquestardie/network-tools/stargazers","contributors_url":"https://api.github.com/repos/jacquestardie/network-tools/contributors","subscribers_url":"https://api.github.com/repos/jacquestardie/network-tools/subscribers","subscription_url":"https://api.github.com/repos/jacquestardie/network-tools/subscription","commits_url":"https://api.github.com/repos/jacquestardie/network-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacquestardie/network-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacquestardie/network-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacquestardie/network-tools/contents/{+path}","compare_url":"https://api.github.com/repos/jacquestardie/network-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacquestardie/network-tools/merges","archive_url":"https://api.github.com/repos/jacquestardie/network-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacquestardie/network-tools/downloads","issues_url":"https://api.github.com/repos/jacquestardie/network-tools/issues{/number}","pulls_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/jacquestardie/network-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/jacquestardie/network-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacquestardie/network-tools/labels{/name}","releases_url":"https://api.github.com/repos/jacquestardie/network-tools/releases{/id}","created_at":"2015-02-15T03:38:57Z","updated_at":"2015-02-15T21:13:02Z","pushed_at":"2015-03-09T01:11:56Z","git_url":"git://github.com/jacquestardie/network-tools.git","ssh_url":"git@github.com:jacquestardie/network-tools.git","clone_url":"https://github.com/jacquestardie/network-tools.git","svn_url":"https://github.com/jacquestardie/network-tools","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jacquestardie:master","ref":"master","sha":"8075d31c4ffd4eff2ba35aedebb13f6c597f17ae","user":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"repo":{"id":30816897,"name":"network-tools","full_name":"jacquestardie/network-tools","owner":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacquestardie/network-tools","description":"","fork":false,"url":"https://api.github.com/repos/jacquestardie/network-tools","forks_url":"https://api.github.com/repos/jacquestardie/network-tools/forks","keys_url":"https://api.github.com/repos/jacquestardie/network-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacquestardie/network-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacquestardie/network-tools/teams","hooks_url":"https://api.github.com/repos/jacquestardie/network-tools/hooks","issue_events_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/events{/number}","events_url":"https://api.github.com/repos/jacquestardie/network-tools/events","assignees_url":"https://api.github.com/repos/jacquestardie/network-tools/assignees{/user}","branches_url":"https://api.github.com/repos/jacquestardie/network-tools/branches{/branch}","tags_url":"https://api.github.com/repos/jacquestardie/network-tools/tags","blobs_url":"https://api.github.com/repos/jacquestardie/network-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacquestardie/network-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacquestardie/network-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacquestardie/network-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacquestardie/network-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/jacquestardie/network-tools/languages","stargazers_url":"https://api.github.com/repos/jacquestardie/network-tools/stargazers","contributors_url":"https://api.github.com/repos/jacquestardie/network-tools/contributors","subscribers_url":"https://api.github.com/repos/jacquestardie/network-tools/subscribers","subscription_url":"https://api.github.com/repos/jacquestardie/network-tools/subscription","commits_url":"https://api.github.com/repos/jacquestardie/network-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacquestardie/network-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacquestardie/network-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacquestardie/network-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacquestardie/network-tools/contents/{+path}","compare_url":"https://api.github.com/repos/jacquestardie/network-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacquestardie/network-tools/merges","archive_url":"https://api.github.com/repos/jacquestardie/network-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacquestardie/network-tools/downloads","issues_url":"https://api.github.com/repos/jacquestardie/network-tools/issues{/number}","pulls_url":"https://api.github.com/repos/jacquestardie/network-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/jacquestardie/network-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/jacquestardie/network-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacquestardie/network-tools/labels{/name}","releases_url":"https://api.github.com/repos/jacquestardie/network-tools/releases{/id}","created_at":"2015-02-15T03:38:57Z","updated_at":"2015-02-15T21:13:02Z","pushed_at":"2015-03-09T01:11:56Z","git_url":"git://github.com/jacquestardie/network-tools.git","ssh_url":"git@github.com:jacquestardie/network-tools.git","clone_url":"https://github.com/jacquestardie/network-tools.git","svn_url":"https://github.com/jacquestardie/network-tools","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2"},"html":{"href":"https://github.com/jacquestardie/network-tools/pull/2"},"issue":{"href":"https://api.github.com/repos/jacquestardie/network-tools/issues/2"},"comments":{"href":"https://api.github.com/repos/jacquestardie/network-tools/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jacquestardie/network-tools/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jacquestardie/network-tools/statuses/3bee905b295e600204af945b11b592b95ab9f070"}}}}