{"action":"created","comment":{"url":"https://api.github.com/repos/yegor256/takes/pulls/comments/165849281","pull_request_review_id":93850044,"id":165849281,"diff_hunk":"@@ -68,11 +70,59 @@ public TkRedirect(final String location, final int code) {\n         super(\n             new Take() {\n                 @Override\n-                public Response act(final Request req) {\n-                    return new RsRedirect(location, code);\n+                public Response act(final Request req) throws IOException {\n+                    return new RsRedirect(\n+                        new RedirectParams(req, location).location(),\n+                        code\n+                    );\n                 }\n             }\n         );\n     }\n \n+    /**\n+     * Extract params from original query.\n+     */\n+    private static final class RedirectParams {","path":"src/main/java/org/takes/tk/TkRedirect.java","position":34,"original_position":34,"commit_id":"c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea","original_commit_id":"c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea","user":{"login":"g4s8","id":1524988,"avatar_url":"https://avatars0.githubusercontent.com/u/1524988?v=4","gravatar_id":"","url":"https://api.github.com/users/g4s8","html_url":"https://github.com/g4s8","followers_url":"https://api.github.com/users/g4s8/followers","following_url":"https://api.github.com/users/g4s8/following{/other_user}","gists_url":"https://api.github.com/users/g4s8/gists{/gist_id}","starred_url":"https://api.github.com/users/g4s8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g4s8/subscriptions","organizations_url":"https://api.github.com/users/g4s8/orgs","repos_url":"https://api.github.com/users/g4s8/repos","events_url":"https://api.github.com/users/g4s8/events{/privacy}","received_events_url":"https://api.github.com/users/g4s8/received_events","type":"User","site_admin":false},"body":"@neonailol I think you can use `RqHref(req).href()` instead of this new class","created_at":"2018-02-04T16:18:56Z","updated_at":"2018-02-04T16:24:26Z","html_url":"https://github.com/yegor256/takes/pull/792#discussion_r165849281","pull_request_url":"https://api.github.com/repos/yegor256/takes/pulls/792","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments/165849281"},"html":{"href":"https://github.com/yegor256/takes/pull/792#discussion_r165849281"},"pull_request":{"href":"https://api.github.com/repos/yegor256/takes/pulls/792"}}},"pull_request":{"url":"https://api.github.com/repos/yegor256/takes/pulls/792","id":167014641,"html_url":"https://github.com/yegor256/takes/pull/792","diff_url":"https://github.com/yegor256/takes/pull/792.diff","patch_url":"https://github.com/yegor256/takes/pull/792.patch","issue_url":"https://api.github.com/repos/yegor256/takes/issues/792","number":792,"state":"open","locked":false,"title":"TkRedirect should carry on the query and the fragment #779","user":{"login":"neonailol","id":440768,"avatar_url":"https://avatars3.githubusercontent.com/u/440768?v=4","gravatar_id":"","url":"https://api.github.com/users/neonailol","html_url":"https://github.com/neonailol","followers_url":"https://api.github.com/users/neonailol/followers","following_url":"https://api.github.com/users/neonailol/following{/other_user}","gists_url":"https://api.github.com/users/neonailol/gists{/gist_id}","starred_url":"https://api.github.com/users/neonailol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonailol/subscriptions","organizations_url":"https://api.github.com/users/neonailol/orgs","repos_url":"https://api.github.com/users/neonailol/repos","events_url":"https://api.github.com/users/neonailol/events{/privacy}","received_events_url":"https://api.github.com/users/neonailol/received_events","type":"User","site_admin":false},"body":"Closes #779 ","created_at":"2018-02-04T15:20:03Z","updated_at":"2018-02-04T16:24:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f75f16445cdda83dddea79a6105f0d5ab849ed27","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/yegor256/takes/pulls/792/commits","review_comments_url":"https://api.github.com/repos/yegor256/takes/pulls/792/comments","review_comment_url":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yegor256/takes/issues/792/comments","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea","head":{"label":"neonailol:779","ref":"779","sha":"c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea","user":{"login":"neonailol","id":440768,"avatar_url":"https://avatars3.githubusercontent.com/u/440768?v=4","gravatar_id":"","url":"https://api.github.com/users/neonailol","html_url":"https://github.com/neonailol","followers_url":"https://api.github.com/users/neonailol/followers","following_url":"https://api.github.com/users/neonailol/following{/other_user}","gists_url":"https://api.github.com/users/neonailol/gists{/gist_id}","starred_url":"https://api.github.com/users/neonailol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonailol/subscriptions","organizations_url":"https://api.github.com/users/neonailol/orgs","repos_url":"https://api.github.com/users/neonailol/repos","events_url":"https://api.github.com/users/neonailol/events{/privacy}","received_events_url":"https://api.github.com/users/neonailol/received_events","type":"User","site_admin":false},"repo":{"id":116706218,"name":"takes","full_name":"neonailol/takes","owner":{"login":"neonailol","id":440768,"avatar_url":"https://avatars3.githubusercontent.com/u/440768?v=4","gravatar_id":"","url":"https://api.github.com/users/neonailol","html_url":"https://github.com/neonailol","followers_url":"https://api.github.com/users/neonailol/followers","following_url":"https://api.github.com/users/neonailol/following{/other_user}","gists_url":"https://api.github.com/users/neonailol/gists{/gist_id}","starred_url":"https://api.github.com/users/neonailol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neonailol/subscriptions","organizations_url":"https://api.github.com/users/neonailol/orgs","repos_url":"https://api.github.com/users/neonailol/repos","events_url":"https://api.github.com/users/neonailol/events{/privacy}","received_events_url":"https://api.github.com/users/neonailol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neonailol/takes","description":"True Object-Oriented Java Web Framework","fork":true,"url":"https://api.github.com/repos/neonailol/takes","forks_url":"https://api.github.com/repos/neonailol/takes/forks","keys_url":"https://api.github.com/repos/neonailol/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neonailol/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neonailol/takes/teams","hooks_url":"https://api.github.com/repos/neonailol/takes/hooks","issue_events_url":"https://api.github.com/repos/neonailol/takes/issues/events{/number}","events_url":"https://api.github.com/repos/neonailol/takes/events","assignees_url":"https://api.github.com/repos/neonailol/takes/assignees{/user}","branches_url":"https://api.github.com/repos/neonailol/takes/branches{/branch}","tags_url":"https://api.github.com/repos/neonailol/takes/tags","blobs_url":"https://api.github.com/repos/neonailol/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neonailol/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neonailol/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/neonailol/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neonailol/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/neonailol/takes/languages","stargazers_url":"https://api.github.com/repos/neonailol/takes/stargazers","contributors_url":"https://api.github.com/repos/neonailol/takes/contributors","subscribers_url":"https://api.github.com/repos/neonailol/takes/subscribers","subscription_url":"https://api.github.com/repos/neonailol/takes/subscription","commits_url":"https://api.github.com/repos/neonailol/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/neonailol/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/neonailol/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/neonailol/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/neonailol/takes/contents/{+path}","compare_url":"https://api.github.com/repos/neonailol/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neonailol/takes/merges","archive_url":"https://api.github.com/repos/neonailol/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neonailol/takes/downloads","issues_url":"https://api.github.com/repos/neonailol/takes/issues{/number}","pulls_url":"https://api.github.com/repos/neonailol/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/neonailol/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/neonailol/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neonailol/takes/labels{/name}","releases_url":"https://api.github.com/repos/neonailol/takes/releases{/id}","deployments_url":"https://api.github.com/repos/neonailol/takes/deployments","created_at":"2018-01-08T17:20:46Z","updated_at":"2018-01-18T13:51:25Z","pushed_at":"2018-02-04T15:19:36Z","git_url":"git://github.com/neonailol/takes.git","ssh_url":"git@github.com:neonailol/takes.git","clone_url":"https://github.com/neonailol/takes.git","svn_url":"https://github.com/neonailol/takes","homepage":"http://www.takes.org","size":30220,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yegor256:master","ref":"master","sha":"fa0f212766291609d4dcd39256c5f279d4cc2d10","user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars3.githubusercontent.com/u/526301?v=4","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"repo":{"id":28924109,"name":"takes","full_name":"yegor256/takes","owner":{"login":"yegor256","id":526301,"avatar_url":"https://avatars3.githubusercontent.com/u/526301?v=4","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yegor256/takes","description":"True Object-Oriented Java Web Framework","fork":false,"url":"https://api.github.com/repos/yegor256/takes","forks_url":"https://api.github.com/repos/yegor256/takes/forks","keys_url":"https://api.github.com/repos/yegor256/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yegor256/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yegor256/takes/teams","hooks_url":"https://api.github.com/repos/yegor256/takes/hooks","issue_events_url":"https://api.github.com/repos/yegor256/takes/issues/events{/number}","events_url":"https://api.github.com/repos/yegor256/takes/events","assignees_url":"https://api.github.com/repos/yegor256/takes/assignees{/user}","branches_url":"https://api.github.com/repos/yegor256/takes/branches{/branch}","tags_url":"https://api.github.com/repos/yegor256/takes/tags","blobs_url":"https://api.github.com/repos/yegor256/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yegor256/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yegor256/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/yegor256/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/yegor256/takes/languages","stargazers_url":"https://api.github.com/repos/yegor256/takes/stargazers","contributors_url":"https://api.github.com/repos/yegor256/takes/contributors","subscribers_url":"https://api.github.com/repos/yegor256/takes/subscribers","subscription_url":"https://api.github.com/repos/yegor256/takes/subscription","commits_url":"https://api.github.com/repos/yegor256/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/yegor256/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/yegor256/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/yegor256/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/yegor256/takes/contents/{+path}","compare_url":"https://api.github.com/repos/yegor256/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yegor256/takes/merges","archive_url":"https://api.github.com/repos/yegor256/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yegor256/takes/downloads","issues_url":"https://api.github.com/repos/yegor256/takes/issues{/number}","pulls_url":"https://api.github.com/repos/yegor256/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/yegor256/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/yegor256/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yegor256/takes/labels{/name}","releases_url":"https://api.github.com/repos/yegor256/takes/releases{/id}","deployments_url":"https://api.github.com/repos/yegor256/takes/deployments","created_at":"2015-01-07T16:57:47Z","updated_at":"2018-02-02T08:50:30Z","pushed_at":"2018-02-04T15:20:04Z","git_url":"git://github.com/yegor256/takes.git","ssh_url":"git@github.com:yegor256/takes.git","clone_url":"https://github.com/yegor256/takes.git","svn_url":"https://github.com/yegor256/takes","homepage":"http://www.takes.org","size":30193,"stargazers_count":373,"watchers_count":373,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":122,"open_issues":45,"watchers":373,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/792"},"html":{"href":"https://github.com/yegor256/takes/pull/792"},"issue":{"href":"https://api.github.com/repos/yegor256/takes/issues/792"},"comments":{"href":"https://api.github.com/repos/yegor256/takes/issues/792/comments"},"review_comments":{"href":"https://api.github.com/repos/yegor256/takes/pulls/792/comments"},"review_comment":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yegor256/takes/pulls/792/commits"},"statuses":{"href":"https://api.github.com/repos/yegor256/takes/statuses/c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"g4s8"}}