{"action":"created","comment":{"url":"https://api.github.com/repos/tbaik/java-server/pulls/comments/29905145","id":29905145,"diff_hunk":"@@ -37,6 +39,21 @@ public void run() {\n         }\n     }\n \n+    private void logRequest(String requestMessage) {\n+        logger.log(\"Received Request:\\r\\n\");\n+        logger.log(requestMessage);\n+    }\n+\n+    public void logResponse(Response response, byte[] responseMessage) {\n+        if(response.getClass().equals(ImageContentResponse.class)){\n+            logger.log(ResponseBuilder.buildResponse(\n+                    response.getStatus(), response.getHeaders(), \"Image body not shown in log\"));\n+        } else {\n+            logger.log(\"Sending Response:\\r\\n\");\n+            logger.log(new String(responseMessage));\n+        }\n+    }","path":"src/com/tony/server/WorkerThread.java","position":47,"original_position":47,"commit_id":"33b4504113904040cd2c1e070e1b89b96a97a7fd","original_commit_id":"33b4504113904040cd2c1e070e1b89b96a97a7fd","user":{"login":"jassa","id":368802,"avatar_url":"https://avatars.githubusercontent.com/u/368802?v=3","gravatar_id":"","url":"https://api.github.com/users/jassa","html_url":"https://github.com/jassa","followers_url":"https://api.github.com/users/jassa/followers","following_url":"https://api.github.com/users/jassa/following{/other_user}","gists_url":"https://api.github.com/users/jassa/gists{/gist_id}","starred_url":"https://api.github.com/users/jassa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jassa/subscriptions","organizations_url":"https://api.github.com/users/jassa/orgs","repos_url":"https://api.github.com/users/jassa/repos","events_url":"https://api.github.com/users/jassa/events{/privacy}","received_events_url":"https://api.github.com/users/jassa/received_events","type":"User","site_admin":false},"body":"if different types of responses have different text representations, this method could get pretty big","created_at":"2015-05-07T23:11:27Z","updated_at":"2015-05-07T23:11:27Z","html_url":"https://github.com/tbaik/java-server/pull/7#discussion_r29905145","pull_request_url":"https://api.github.com/repos/tbaik/java-server/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/comments/29905145"},"html":{"href":"https://github.com/tbaik/java-server/pull/7#discussion_r29905145"},"pull_request":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/tbaik/java-server/pulls/7","id":34572140,"html_url":"https://github.com/tbaik/java-server/pull/7","diff_url":"https://github.com/tbaik/java-server/pull/7.diff","patch_url":"https://github.com/tbaik/java-server/pull/7.patch","issue_url":"https://api.github.com/repos/tbaik/java-server/issues/7","number":7,"state":"open","locked":false,"title":"Patch with etag","user":{"login":"tbaik","id":2181740,"avatar_url":"https://avatars.githubusercontent.com/u/2181740?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaik","html_url":"https://github.com/tbaik","followers_url":"https://api.github.com/users/tbaik/followers","following_url":"https://api.github.com/users/tbaik/following{/other_user}","gists_url":"https://api.github.com/users/tbaik/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaik/subscriptions","organizations_url":"https://api.github.com/users/tbaik/orgs","repos_url":"https://api.github.com/users/tbaik/repos","events_url":"https://api.github.com/users/tbaik/events{/privacy}","received_events_url":"https://api.github.com/users/tbaik/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-01T22:19:20Z","updated_at":"2015-05-07T23:11:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14a5d782f8c1ab067af4505da2f9e7ded010fc33","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tbaik/java-server/pulls/7/commits","review_comments_url":"https://api.github.com/repos/tbaik/java-server/pulls/7/comments","review_comment_url":"https://api.github.com/repos/tbaik/java-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tbaik/java-server/issues/7/comments","statuses_url":"https://api.github.com/repos/tbaik/java-server/statuses/33b4504113904040cd2c1e070e1b89b96a97a7fd","head":{"label":"tbaik:patch-with-etag","ref":"patch-with-etag","sha":"33b4504113904040cd2c1e070e1b89b96a97a7fd","user":{"login":"tbaik","id":2181740,"avatar_url":"https://avatars.githubusercontent.com/u/2181740?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaik","html_url":"https://github.com/tbaik","followers_url":"https://api.github.com/users/tbaik/followers","following_url":"https://api.github.com/users/tbaik/following{/other_user}","gists_url":"https://api.github.com/users/tbaik/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaik/subscriptions","organizations_url":"https://api.github.com/users/tbaik/orgs","repos_url":"https://api.github.com/users/tbaik/repos","events_url":"https://api.github.com/users/tbaik/events{/privacy}","received_events_url":"https://api.github.com/users/tbaik/received_events","type":"User","site_admin":false},"repo":{"id":33741021,"name":"java-server","full_name":"tbaik/java-server","owner":{"login":"tbaik","id":2181740,"avatar_url":"https://avatars.githubusercontent.com/u/2181740?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaik","html_url":"https://github.com/tbaik","followers_url":"https://api.github.com/users/tbaik/followers","following_url":"https://api.github.com/users/tbaik/following{/other_user}","gists_url":"https://api.github.com/users/tbaik/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaik/subscriptions","organizations_url":"https://api.github.com/users/tbaik/orgs","repos_url":"https://api.github.com/users/tbaik/repos","events_url":"https://api.github.com/users/tbaik/events{/privacy}","received_events_url":"https://api.github.com/users/tbaik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbaik/java-server","description":"","fork":false,"url":"https://api.github.com/repos/tbaik/java-server","forks_url":"https://api.github.com/repos/tbaik/java-server/forks","keys_url":"https://api.github.com/repos/tbaik/java-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbaik/java-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbaik/java-server/teams","hooks_url":"https://api.github.com/repos/tbaik/java-server/hooks","issue_events_url":"https://api.github.com/repos/tbaik/java-server/issues/events{/number}","events_url":"https://api.github.com/repos/tbaik/java-server/events","assignees_url":"https://api.github.com/repos/tbaik/java-server/assignees{/user}","branches_url":"https://api.github.com/repos/tbaik/java-server/branches{/branch}","tags_url":"https://api.github.com/repos/tbaik/java-server/tags","blobs_url":"https://api.github.com/repos/tbaik/java-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbaik/java-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbaik/java-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbaik/java-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbaik/java-server/statuses/{sha}","languages_url":"https://api.github.com/repos/tbaik/java-server/languages","stargazers_url":"https://api.github.com/repos/tbaik/java-server/stargazers","contributors_url":"https://api.github.com/repos/tbaik/java-server/contributors","subscribers_url":"https://api.github.com/repos/tbaik/java-server/subscribers","subscription_url":"https://api.github.com/repos/tbaik/java-server/subscription","commits_url":"https://api.github.com/repos/tbaik/java-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbaik/java-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbaik/java-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbaik/java-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbaik/java-server/contents/{+path}","compare_url":"https://api.github.com/repos/tbaik/java-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbaik/java-server/merges","archive_url":"https://api.github.com/repos/tbaik/java-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbaik/java-server/downloads","issues_url":"https://api.github.com/repos/tbaik/java-server/issues{/number}","pulls_url":"https://api.github.com/repos/tbaik/java-server/pulls{/number}","milestones_url":"https://api.github.com/repos/tbaik/java-server/milestones{/number}","notifications_url":"https://api.github.com/repos/tbaik/java-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbaik/java-server/labels{/name}","releases_url":"https://api.github.com/repos/tbaik/java-server/releases{/id}","created_at":"2015-04-10T17:22:48Z","updated_at":"2015-05-07T05:32:08Z","pushed_at":"2015-05-07T22:50:14Z","git_url":"git://github.com/tbaik/java-server.git","ssh_url":"git@github.com:tbaik/java-server.git","clone_url":"https://github.com/tbaik/java-server.git","svn_url":"https://github.com/tbaik/java-server","homepage":null,"size":1020,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"tbaik:master","ref":"master","sha":"c442972c9766740376fcba9799e37241ebd12fa4","user":{"login":"tbaik","id":2181740,"avatar_url":"https://avatars.githubusercontent.com/u/2181740?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaik","html_url":"https://github.com/tbaik","followers_url":"https://api.github.com/users/tbaik/followers","following_url":"https://api.github.com/users/tbaik/following{/other_user}","gists_url":"https://api.github.com/users/tbaik/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaik/subscriptions","organizations_url":"https://api.github.com/users/tbaik/orgs","repos_url":"https://api.github.com/users/tbaik/repos","events_url":"https://api.github.com/users/tbaik/events{/privacy}","received_events_url":"https://api.github.com/users/tbaik/received_events","type":"User","site_admin":false},"repo":{"id":33741021,"name":"java-server","full_name":"tbaik/java-server","owner":{"login":"tbaik","id":2181740,"avatar_url":"https://avatars.githubusercontent.com/u/2181740?v=3","gravatar_id":"","url":"https://api.github.com/users/tbaik","html_url":"https://github.com/tbaik","followers_url":"https://api.github.com/users/tbaik/followers","following_url":"https://api.github.com/users/tbaik/following{/other_user}","gists_url":"https://api.github.com/users/tbaik/gists{/gist_id}","starred_url":"https://api.github.com/users/tbaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbaik/subscriptions","organizations_url":"https://api.github.com/users/tbaik/orgs","repos_url":"https://api.github.com/users/tbaik/repos","events_url":"https://api.github.com/users/tbaik/events{/privacy}","received_events_url":"https://api.github.com/users/tbaik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbaik/java-server","description":"","fork":false,"url":"https://api.github.com/repos/tbaik/java-server","forks_url":"https://api.github.com/repos/tbaik/java-server/forks","keys_url":"https://api.github.com/repos/tbaik/java-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbaik/java-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbaik/java-server/teams","hooks_url":"https://api.github.com/repos/tbaik/java-server/hooks","issue_events_url":"https://api.github.com/repos/tbaik/java-server/issues/events{/number}","events_url":"https://api.github.com/repos/tbaik/java-server/events","assignees_url":"https://api.github.com/repos/tbaik/java-server/assignees{/user}","branches_url":"https://api.github.com/repos/tbaik/java-server/branches{/branch}","tags_url":"https://api.github.com/repos/tbaik/java-server/tags","blobs_url":"https://api.github.com/repos/tbaik/java-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbaik/java-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbaik/java-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbaik/java-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbaik/java-server/statuses/{sha}","languages_url":"https://api.github.com/repos/tbaik/java-server/languages","stargazers_url":"https://api.github.com/repos/tbaik/java-server/stargazers","contributors_url":"https://api.github.com/repos/tbaik/java-server/contributors","subscribers_url":"https://api.github.com/repos/tbaik/java-server/subscribers","subscription_url":"https://api.github.com/repos/tbaik/java-server/subscription","commits_url":"https://api.github.com/repos/tbaik/java-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbaik/java-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbaik/java-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbaik/java-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbaik/java-server/contents/{+path}","compare_url":"https://api.github.com/repos/tbaik/java-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbaik/java-server/merges","archive_url":"https://api.github.com/repos/tbaik/java-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbaik/java-server/downloads","issues_url":"https://api.github.com/repos/tbaik/java-server/issues{/number}","pulls_url":"https://api.github.com/repos/tbaik/java-server/pulls{/number}","milestones_url":"https://api.github.com/repos/tbaik/java-server/milestones{/number}","notifications_url":"https://api.github.com/repos/tbaik/java-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbaik/java-server/labels{/name}","releases_url":"https://api.github.com/repos/tbaik/java-server/releases{/id}","created_at":"2015-04-10T17:22:48Z","updated_at":"2015-05-07T05:32:08Z","pushed_at":"2015-05-07T22:50:14Z","git_url":"git://github.com/tbaik/java-server.git","ssh_url":"git@github.com:tbaik/java-server.git","clone_url":"https://github.com/tbaik/java-server.git","svn_url":"https://github.com/tbaik/java-server","homepage":null,"size":1020,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/7"},"html":{"href":"https://github.com/tbaik/java-server/pull/7"},"issue":{"href":"https://api.github.com/repos/tbaik/java-server/issues/7"},"comments":{"href":"https://api.github.com/repos/tbaik/java-server/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tbaik/java-server/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/tbaik/java-server/statuses/33b4504113904040cd2c1e070e1b89b96a97a7fd"}}}}