{"action":"created","comment":{"url":"https://api.github.com/repos/kittinunf/Fuel/pulls/comments/76931781","id":76931781,"diff_hunk":"@@ -1,15 +1,13 @@\n package com.github.kittinunf.fuel.core.interceptors\n \n-import com.github.kittinunf.fuel.Fuel\n-import com.github.kittinunf.fuel.core.Encoding\n-import com.github.kittinunf.fuel.core.FuelError\n-import com.github.kittinunf.fuel.core.Request\n-import com.github.kittinunf.fuel.core.Response\n+import com.github.kittinunf.fuel.core.*\n+import java.net.MalformedURLException\n+import java.net.URL\n import javax.net.ssl.HttpsURLConnection\n \n class RedirectException() : Exception(\"Redirection fail, not found URL to redirect to\")\n \n-fun redirectResponseInterceptor() =\n+fun redirectResponseInterceptor(manager: FuelManager) =","path":"fuel/src/main/kotlin/com/github/kittinunf/fuel/core/interceptors/RedirectionInterceptor.kt","position":16,"original_position":16,"commit_id":"63bc294f711cc47d2bbadaab90b95e84f0ba017f","original_commit_id":"63bc294f711cc47d2bbadaab90b95e84f0ba017f","user":{"login":"spand","id":1454142,"avatar_url":"https://avatars.githubusercontent.com/u/1454142?v=3","gravatar_id":"","url":"https://api.github.com/users/spand","html_url":"https://github.com/spand","followers_url":"https://api.github.com/users/spand/followers","following_url":"https://api.github.com/users/spand/following{/other_user}","gists_url":"https://api.github.com/users/spand/gists{/gist_id}","starred_url":"https://api.github.com/users/spand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spand/subscriptions","organizations_url":"https://api.github.com/users/spand/orgs","repos_url":"https://api.github.com/users/spand/repos","events_url":"https://api.github.com/users/spand/events{/privacy}","received_events_url":"https://api.github.com/users/spand/received_events","type":"User","site_admin":false},"body":"It looks fine to me. \r\n- If the `interceptor` is removed from the `manager` then the `interceptor` will become garbage even if it holds a reference to the `manager`\r\n- If the `manager` is no longer referenced both will become garbage even if there is a reference cycle.\r\n\r\nThe java garbage collector has no problem with cycles, unlike what I believe is the case with iOS or Python. If this is your background maybe this stackoverflow question will make it more clear: http://stackoverflow.com/questions/1910194/how-does-java-garbage-collection-work-with-circular-references","created_at":"2016-08-31T06:41:43Z","updated_at":"2016-08-31T06:41:43Z","html_url":"https://github.com/kittinunf/Fuel/pull/110#discussion_r76931781","pull_request_url":"https://api.github.com/repos/kittinunf/Fuel/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/comments/76931781"},"html":{"href":"https://github.com/kittinunf/Fuel/pull/110#discussion_r76931781"},"pull_request":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/kittinunf/Fuel/pulls/110","id":82317345,"html_url":"https://github.com/kittinunf/Fuel/pull/110","diff_url":"https://github.com/kittinunf/Fuel/pull/110.diff","patch_url":"https://github.com/kittinunf/Fuel/pull/110.patch","issue_url":"https://api.github.com/repos/kittinunf/Fuel/issues/110","number":110,"state":"open","locked":false,"title":"Redirection following can now be disabled for relative urls. With test.","user":{"login":"spand","id":1454142,"avatar_url":"https://avatars.githubusercontent.com/u/1454142?v=3","gravatar_id":"","url":"https://api.github.com/users/spand","html_url":"https://github.com/spand","followers_url":"https://api.github.com/users/spand/followers","following_url":"https://api.github.com/users/spand/following{/other_user}","gists_url":"https://api.github.com/users/spand/gists{/gist_id}","starred_url":"https://api.github.com/users/spand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spand/subscriptions","organizations_url":"https://api.github.com/users/spand/orgs","repos_url":"https://api.github.com/users/spand/repos","events_url":"https://api.github.com/users/spand/events{/privacy}","received_events_url":"https://api.github.com/users/spand/received_events","type":"User","site_admin":false},"body":"HTTPUrlConnection is following redirects by default. It seems the idea is that this is to be handled by Fuel itself.\r\n\r\nI couldnt run the other tests as typicode.com returns 403 for me, but the new test case failed before and doesnt now.","created_at":"2016-08-23T07:44:06Z","updated_at":"2016-08-31T06:41:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f3d64917f97e590f2ca120c7123e7c8e5342994","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kittinunf/Fuel/pulls/110/commits","review_comments_url":"https://api.github.com/repos/kittinunf/Fuel/pulls/110/comments","review_comment_url":"https://api.github.com/repos/kittinunf/Fuel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kittinunf/Fuel/issues/110/comments","statuses_url":"https://api.github.com/repos/kittinunf/Fuel/statuses/63bc294f711cc47d2bbadaab90b95e84f0ba017f","head":{"label":"spand:disableRedirect","ref":"disableRedirect","sha":"63bc294f711cc47d2bbadaab90b95e84f0ba017f","user":{"login":"spand","id":1454142,"avatar_url":"https://avatars.githubusercontent.com/u/1454142?v=3","gravatar_id":"","url":"https://api.github.com/users/spand","html_url":"https://github.com/spand","followers_url":"https://api.github.com/users/spand/followers","following_url":"https://api.github.com/users/spand/following{/other_user}","gists_url":"https://api.github.com/users/spand/gists{/gist_id}","starred_url":"https://api.github.com/users/spand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spand/subscriptions","organizations_url":"https://api.github.com/users/spand/orgs","repos_url":"https://api.github.com/users/spand/repos","events_url":"https://api.github.com/users/spand/events{/privacy}","received_events_url":"https://api.github.com/users/spand/received_events","type":"User","site_admin":false},"repo":{"id":66341804,"name":"Fuel","full_name":"spand/Fuel","owner":{"login":"spand","id":1454142,"avatar_url":"https://avatars.githubusercontent.com/u/1454142?v=3","gravatar_id":"","url":"https://api.github.com/users/spand","html_url":"https://github.com/spand","followers_url":"https://api.github.com/users/spand/followers","following_url":"https://api.github.com/users/spand/following{/other_user}","gists_url":"https://api.github.com/users/spand/gists{/gist_id}","starred_url":"https://api.github.com/users/spand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spand/subscriptions","organizations_url":"https://api.github.com/users/spand/orgs","repos_url":"https://api.github.com/users/spand/repos","events_url":"https://api.github.com/users/spand/events{/privacy}","received_events_url":"https://api.github.com/users/spand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spand/Fuel","description":"The easiest HTTP networking library for Kotlin/Android","fork":true,"url":"https://api.github.com/repos/spand/Fuel","forks_url":"https://api.github.com/repos/spand/Fuel/forks","keys_url":"https://api.github.com/repos/spand/Fuel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spand/Fuel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spand/Fuel/teams","hooks_url":"https://api.github.com/repos/spand/Fuel/hooks","issue_events_url":"https://api.github.com/repos/spand/Fuel/issues/events{/number}","events_url":"https://api.github.com/repos/spand/Fuel/events","assignees_url":"https://api.github.com/repos/spand/Fuel/assignees{/user}","branches_url":"https://api.github.com/repos/spand/Fuel/branches{/branch}","tags_url":"https://api.github.com/repos/spand/Fuel/tags","blobs_url":"https://api.github.com/repos/spand/Fuel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spand/Fuel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spand/Fuel/git/refs{/sha}","trees_url":"https://api.github.com/repos/spand/Fuel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spand/Fuel/statuses/{sha}","languages_url":"https://api.github.com/repos/spand/Fuel/languages","stargazers_url":"https://api.github.com/repos/spand/Fuel/stargazers","contributors_url":"https://api.github.com/repos/spand/Fuel/contributors","subscribers_url":"https://api.github.com/repos/spand/Fuel/subscribers","subscription_url":"https://api.github.com/repos/spand/Fuel/subscription","commits_url":"https://api.github.com/repos/spand/Fuel/commits{/sha}","git_commits_url":"https://api.github.com/repos/spand/Fuel/git/commits{/sha}","comments_url":"https://api.github.com/repos/spand/Fuel/comments{/number}","issue_comment_url":"https://api.github.com/repos/spand/Fuel/issues/comments{/number}","contents_url":"https://api.github.com/repos/spand/Fuel/contents/{+path}","compare_url":"https://api.github.com/repos/spand/Fuel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spand/Fuel/merges","archive_url":"https://api.github.com/repos/spand/Fuel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spand/Fuel/downloads","issues_url":"https://api.github.com/repos/spand/Fuel/issues{/number}","pulls_url":"https://api.github.com/repos/spand/Fuel/pulls{/number}","milestones_url":"https://api.github.com/repos/spand/Fuel/milestones{/number}","notifications_url":"https://api.github.com/repos/spand/Fuel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spand/Fuel/labels{/name}","releases_url":"https://api.github.com/repos/spand/Fuel/releases{/id}","deployments_url":"https://api.github.com/repos/spand/Fuel/deployments","created_at":"2016-08-23T06:59:51Z","updated_at":"2016-08-23T06:59:52Z","pushed_at":"2016-08-25T08:30:11Z","git_url":"git://github.com/spand/Fuel.git","ssh_url":"git@github.com:spand/Fuel.git","clone_url":"https://github.com/spand/Fuel.git","svn_url":"https://github.com/spand/Fuel","homepage":"","size":582,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kittinunf:master","ref":"master","sha":"859d0b16575d8e0a4bd029c27130da57a3973901","user":{"login":"kittinunf","id":4669517,"avatar_url":"https://avatars.githubusercontent.com/u/4669517?v=3","gravatar_id":"","url":"https://api.github.com/users/kittinunf","html_url":"https://github.com/kittinunf","followers_url":"https://api.github.com/users/kittinunf/followers","following_url":"https://api.github.com/users/kittinunf/following{/other_user}","gists_url":"https://api.github.com/users/kittinunf/gists{/gist_id}","starred_url":"https://api.github.com/users/kittinunf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittinunf/subscriptions","organizations_url":"https://api.github.com/users/kittinunf/orgs","repos_url":"https://api.github.com/users/kittinunf/repos","events_url":"https://api.github.com/users/kittinunf/events{/privacy}","received_events_url":"https://api.github.com/users/kittinunf/received_events","type":"User","site_admin":false},"repo":{"id":36847034,"name":"Fuel","full_name":"kittinunf/Fuel","owner":{"login":"kittinunf","id":4669517,"avatar_url":"https://avatars.githubusercontent.com/u/4669517?v=3","gravatar_id":"","url":"https://api.github.com/users/kittinunf","html_url":"https://github.com/kittinunf","followers_url":"https://api.github.com/users/kittinunf/followers","following_url":"https://api.github.com/users/kittinunf/following{/other_user}","gists_url":"https://api.github.com/users/kittinunf/gists{/gist_id}","starred_url":"https://api.github.com/users/kittinunf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittinunf/subscriptions","organizations_url":"https://api.github.com/users/kittinunf/orgs","repos_url":"https://api.github.com/users/kittinunf/repos","events_url":"https://api.github.com/users/kittinunf/events{/privacy}","received_events_url":"https://api.github.com/users/kittinunf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kittinunf/Fuel","description":"The easiest HTTP networking library for Kotlin/Android","fork":false,"url":"https://api.github.com/repos/kittinunf/Fuel","forks_url":"https://api.github.com/repos/kittinunf/Fuel/forks","keys_url":"https://api.github.com/repos/kittinunf/Fuel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kittinunf/Fuel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kittinunf/Fuel/teams","hooks_url":"https://api.github.com/repos/kittinunf/Fuel/hooks","issue_events_url":"https://api.github.com/repos/kittinunf/Fuel/issues/events{/number}","events_url":"https://api.github.com/repos/kittinunf/Fuel/events","assignees_url":"https://api.github.com/repos/kittinunf/Fuel/assignees{/user}","branches_url":"https://api.github.com/repos/kittinunf/Fuel/branches{/branch}","tags_url":"https://api.github.com/repos/kittinunf/Fuel/tags","blobs_url":"https://api.github.com/repos/kittinunf/Fuel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kittinunf/Fuel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kittinunf/Fuel/git/refs{/sha}","trees_url":"https://api.github.com/repos/kittinunf/Fuel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kittinunf/Fuel/statuses/{sha}","languages_url":"https://api.github.com/repos/kittinunf/Fuel/languages","stargazers_url":"https://api.github.com/repos/kittinunf/Fuel/stargazers","contributors_url":"https://api.github.com/repos/kittinunf/Fuel/contributors","subscribers_url":"https://api.github.com/repos/kittinunf/Fuel/subscribers","subscription_url":"https://api.github.com/repos/kittinunf/Fuel/subscription","commits_url":"https://api.github.com/repos/kittinunf/Fuel/commits{/sha}","git_commits_url":"https://api.github.com/repos/kittinunf/Fuel/git/commits{/sha}","comments_url":"https://api.github.com/repos/kittinunf/Fuel/comments{/number}","issue_comment_url":"https://api.github.com/repos/kittinunf/Fuel/issues/comments{/number}","contents_url":"https://api.github.com/repos/kittinunf/Fuel/contents/{+path}","compare_url":"https://api.github.com/repos/kittinunf/Fuel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kittinunf/Fuel/merges","archive_url":"https://api.github.com/repos/kittinunf/Fuel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kittinunf/Fuel/downloads","issues_url":"https://api.github.com/repos/kittinunf/Fuel/issues{/number}","pulls_url":"https://api.github.com/repos/kittinunf/Fuel/pulls{/number}","milestones_url":"https://api.github.com/repos/kittinunf/Fuel/milestones{/number}","notifications_url":"https://api.github.com/repos/kittinunf/Fuel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kittinunf/Fuel/labels{/name}","releases_url":"https://api.github.com/repos/kittinunf/Fuel/releases{/id}","deployments_url":"https://api.github.com/repos/kittinunf/Fuel/deployments","created_at":"2015-06-04T04:03:33Z","updated_at":"2016-08-29T10:03:15Z","pushed_at":"2016-08-25T08:30:12Z","git_url":"git://github.com/kittinunf/Fuel.git","ssh_url":"git@github.com:kittinunf/Fuel.git","clone_url":"https://github.com/kittinunf/Fuel.git","svn_url":"https://github.com/kittinunf/Fuel","homepage":"","size":593,"stargazers_count":386,"watchers_count":386,"language":"Kotlin","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":12,"forks":36,"open_issues":12,"watchers":386,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/110"},"html":{"href":"https://github.com/kittinunf/Fuel/pull/110"},"issue":{"href":"https://api.github.com/repos/kittinunf/Fuel/issues/110"},"comments":{"href":"https://api.github.com/repos/kittinunf/Fuel/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kittinunf/Fuel/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/kittinunf/Fuel/statuses/63bc294f711cc47d2bbadaab90b95e84f0ba017f"}}}}
{"actor":{"display_login":"spand"}}