{"action":"created","comment":{"url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/comments/154285862","pull_request_review_id":80425587,"id":154285862,"diff_hunk":"@@ -24,6 +27,109 @@ def __init__(self, request_text):\n         self.parse_request()\n         self.data = request_text\n \n-    def send_error(self, code, message):\n+    def send_error(self, code, message, idk):\n         self.error_code = code\n         self.error_message = message\n+\n+    def parse_request(self):\n+        self.command = None  # set in case of error on the first line\n+        self.request_version = version = self.default_request_version\n+        self.close_connection = True\n+        #requestline = str(self.raw_requestline, 'iso-8859-1')\n+        requestline = self.raw_requestline\n+        requestline = requestline.rstrip('\\r\\n')\n+        self.requestline = requestline\n+        words = requestline.split()\n+        if len(words) == 3:\n+            command, path, version = words\n+            try:\n+                if version[:5] != 'HTTP/':\n+                    raise ValueError\n+                base_version_number = version.split('/', 1)[1]\n+                version_number = base_version_number.split(\".\")\n+                # RFC 2145 section 3.1 says there can be only one \".\" and\n+                #   - major and minor numbers MUST be treated as\n+                #      separate integers;\n+                #   - HTTP/2.4 is a lower version than HTTP/2.13, which in\n+                #      turn is lower than HTTP/12.3;\n+                #   - Leading zeros MUST be ignored by recipients.\n+                if len(version_number) != 2:\n+                    raise ValueError\n+                version_number = int(version_number[0]), int(version_number[1])\n+            except (ValueError, IndexError):\n+                self.send_error(\n+                    HTTPStatus.BAD_REQUEST,\n+                    \"Bad request version (%r)\" % version)","path":"manyfaced/common/httphandler.py","position":50,"original_position":50,"commit_id":"c27cc1f50ba5425ec05f47cdc6ef7c69b364d7c9","original_commit_id":"c27cc1f50ba5425ec05f47cdc6ef7c69b364d7c9","user":{"login":"rhymefororange","id":16821550,"avatar_url":"https://avatars0.githubusercontent.com/u/16821550?v=4","gravatar_id":"","url":"https://api.github.com/users/rhymefororange","html_url":"https://github.com/rhymefororange","followers_url":"https://api.github.com/users/rhymefororange/followers","following_url":"https://api.github.com/users/rhymefororange/following{/other_user}","gists_url":"https://api.github.com/users/rhymefororange/gists{/gist_id}","starred_url":"https://api.github.com/users/rhymefororange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhymefororange/subscriptions","organizations_url":"https://api.github.com/users/rhymefororange/orgs","repos_url":"https://api.github.com/users/rhymefororange/repos","events_url":"https://api.github.com/users/rhymefororange/events{/privacy}","received_events_url":"https://api.github.com/users/rhymefororange/received_events","type":"User","site_admin":false},"body":"Use .format()","created_at":"2017-12-01T08:03:16Z","updated_at":"2017-12-01T08:16:01Z","html_url":"https://github.com/Zloool/manyfaced-honeypot/pull/38#discussion_r154285862","pull_request_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/comments/154285862"},"html":{"href":"https://github.com/Zloool/manyfaced-honeypot/pull/38#discussion_r154285862"},"pull_request":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38","id":155735995,"html_url":"https://github.com/Zloool/manyfaced-honeypot/pull/38","diff_url":"https://github.com/Zloool/manyfaced-honeypot/pull/38.diff","patch_url":"https://github.com/Zloool/manyfaced-honeypot/pull/38.patch","issue_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/38","number":38,"state":"open","locked":false,"title":"Py3 migration","user":{"login":"Zloool","id":6265787,"avatar_url":"https://avatars0.githubusercontent.com/u/6265787?v=4","gravatar_id":"","url":"https://api.github.com/users/Zloool","html_url":"https://github.com/Zloool","followers_url":"https://api.github.com/users/Zloool/followers","following_url":"https://api.github.com/users/Zloool/following{/other_user}","gists_url":"https://api.github.com/users/Zloool/gists{/gist_id}","starred_url":"https://api.github.com/users/Zloool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zloool/subscriptions","organizations_url":"https://api.github.com/users/Zloool/orgs","repos_url":"https://api.github.com/users/Zloool/repos","events_url":"https://api.github.com/users/Zloool/events{/privacy}","received_events_url":"https://api.github.com/users/Zloool/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-30T22:28:54Z","updated_at":"2017-12-01T08:16:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"beec5dbb525b184d41d2f8795e14f4c7073a2aad","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38/commits","review_comments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38/comments","review_comment_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/38/comments","statuses_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/statuses/c27cc1f50ba5425ec05f47cdc6ef7c69b364d7c9","head":{"label":"Zloool:py3-migration","ref":"py3-migration","sha":"c27cc1f50ba5425ec05f47cdc6ef7c69b364d7c9","user":{"login":"Zloool","id":6265787,"avatar_url":"https://avatars0.githubusercontent.com/u/6265787?v=4","gravatar_id":"","url":"https://api.github.com/users/Zloool","html_url":"https://github.com/Zloool","followers_url":"https://api.github.com/users/Zloool/followers","following_url":"https://api.github.com/users/Zloool/following{/other_user}","gists_url":"https://api.github.com/users/Zloool/gists{/gist_id}","starred_url":"https://api.github.com/users/Zloool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zloool/subscriptions","organizations_url":"https://api.github.com/users/Zloool/orgs","repos_url":"https://api.github.com/users/Zloool/repos","events_url":"https://api.github.com/users/Zloool/events{/privacy}","received_events_url":"https://api.github.com/users/Zloool/received_events","type":"User","site_admin":false},"repo":{"id":70581632,"name":"manyfaced-honeypot","full_name":"Zloool/manyfaced-honeypot","owner":{"login":"Zloool","id":6265787,"avatar_url":"https://avatars0.githubusercontent.com/u/6265787?v=4","gravatar_id":"","url":"https://api.github.com/users/Zloool","html_url":"https://github.com/Zloool","followers_url":"https://api.github.com/users/Zloool/followers","following_url":"https://api.github.com/users/Zloool/following{/other_user}","gists_url":"https://api.github.com/users/Zloool/gists{/gist_id}","starred_url":"https://api.github.com/users/Zloool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zloool/subscriptions","organizations_url":"https://api.github.com/users/Zloool/orgs","repos_url":"https://api.github.com/users/Zloool/repos","events_url":"https://api.github.com/users/Zloool/events{/privacy}","received_events_url":"https://api.github.com/users/Zloool/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zloool/manyfaced-honeypot","description":null,"fork":false,"url":"https://api.github.com/repos/Zloool/manyfaced-honeypot","forks_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/forks","keys_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/teams","hooks_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/hooks","issue_events_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/events{/number}","events_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/events","assignees_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/assignees{/user}","branches_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/branches{/branch}","tags_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/tags","blobs_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/statuses/{sha}","languages_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/languages","stargazers_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/stargazers","contributors_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/contributors","subscribers_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/subscribers","subscription_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/subscription","commits_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/contents/{+path}","compare_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/merges","archive_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/downloads","issues_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues{/number}","pulls_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls{/number}","milestones_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/milestones{/number}","notifications_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/labels{/name}","releases_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/releases{/id}","deployments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/deployments","created_at":"2016-10-11T10:18:36Z","updated_at":"2017-11-04T15:33:16Z","pushed_at":"2017-11-30T22:28:54Z","git_url":"git://github.com/Zloool/manyfaced-honeypot.git","ssh_url":"git@github.com:Zloool/manyfaced-honeypot.git","clone_url":"https://github.com/Zloool/manyfaced-honeypot.git","svn_url":"https://github.com/Zloool/manyfaced-honeypot","homepage":null,"size":240,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"Zloool:dev","ref":"dev","sha":"2f713b5f130f2924a338079ac2ea417e820af7f9","user":{"login":"Zloool","id":6265787,"avatar_url":"https://avatars0.githubusercontent.com/u/6265787?v=4","gravatar_id":"","url":"https://api.github.com/users/Zloool","html_url":"https://github.com/Zloool","followers_url":"https://api.github.com/users/Zloool/followers","following_url":"https://api.github.com/users/Zloool/following{/other_user}","gists_url":"https://api.github.com/users/Zloool/gists{/gist_id}","starred_url":"https://api.github.com/users/Zloool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zloool/subscriptions","organizations_url":"https://api.github.com/users/Zloool/orgs","repos_url":"https://api.github.com/users/Zloool/repos","events_url":"https://api.github.com/users/Zloool/events{/privacy}","received_events_url":"https://api.github.com/users/Zloool/received_events","type":"User","site_admin":false},"repo":{"id":70581632,"name":"manyfaced-honeypot","full_name":"Zloool/manyfaced-honeypot","owner":{"login":"Zloool","id":6265787,"avatar_url":"https://avatars0.githubusercontent.com/u/6265787?v=4","gravatar_id":"","url":"https://api.github.com/users/Zloool","html_url":"https://github.com/Zloool","followers_url":"https://api.github.com/users/Zloool/followers","following_url":"https://api.github.com/users/Zloool/following{/other_user}","gists_url":"https://api.github.com/users/Zloool/gists{/gist_id}","starred_url":"https://api.github.com/users/Zloool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zloool/subscriptions","organizations_url":"https://api.github.com/users/Zloool/orgs","repos_url":"https://api.github.com/users/Zloool/repos","events_url":"https://api.github.com/users/Zloool/events{/privacy}","received_events_url":"https://api.github.com/users/Zloool/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zloool/manyfaced-honeypot","description":null,"fork":false,"url":"https://api.github.com/repos/Zloool/manyfaced-honeypot","forks_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/forks","keys_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/teams","hooks_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/hooks","issue_events_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/events{/number}","events_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/events","assignees_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/assignees{/user}","branches_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/branches{/branch}","tags_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/tags","blobs_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/statuses/{sha}","languages_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/languages","stargazers_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/stargazers","contributors_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/contributors","subscribers_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/subscribers","subscription_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/subscription","commits_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/contents/{+path}","compare_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/merges","archive_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/downloads","issues_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues{/number}","pulls_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls{/number}","milestones_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/milestones{/number}","notifications_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/labels{/name}","releases_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/releases{/id}","deployments_url":"https://api.github.com/repos/Zloool/manyfaced-honeypot/deployments","created_at":"2016-10-11T10:18:36Z","updated_at":"2017-11-04T15:33:16Z","pushed_at":"2017-11-30T22:28:54Z","git_url":"git://github.com/Zloool/manyfaced-honeypot.git","ssh_url":"git@github.com:Zloool/manyfaced-honeypot.git","clone_url":"https://github.com/Zloool/manyfaced-honeypot.git","svn_url":"https://github.com/Zloool/manyfaced-honeypot","homepage":null,"size":240,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38"},"html":{"href":"https://github.com/Zloool/manyfaced-honeypot/pull/38"},"issue":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/38"},"comments":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/Zloool/manyfaced-honeypot/statuses/c27cc1f50ba5425ec05f47cdc6ef7c69b364d7c9"}},"author_association":"OWNER"}}
{"actor":{"display_login":"rhymefororange"}}