{"action":"created","comment":{"url":"https://api.github.com/repos/vapor/vapor/pulls/comments/94246272","pull_request_review_id":14777379,"id":94246272,"diff_hunk":"@@ -2,31 +2,31 @@ import HTTP\n import Turnstile\n \n public final class Helper {\n-    public let request: Request\n+    public weak var request: Request?","path":"Sources/Auth/Authentication/Header/Request+Authorization.swift","position":5,"original_position":5,"commit_id":"36fd01c5855b5cc24f5011b7423d183f08bfcfb1","original_commit_id":"36fd01c5855b5cc24f5011b7423d183f08bfcfb1","user":{"login":"vzsg","id":1783465,"avatar_url":"https://avatars.githubusercontent.com/u/1783465?v=3","gravatar_id":"","url":"https://api.github.com/users/vzsg","html_url":"https://github.com/vzsg","followers_url":"https://api.github.com/users/vzsg/followers","following_url":"https://api.github.com/users/vzsg/following{/other_user}","gists_url":"https://api.github.com/users/vzsg/gists{/gist_id}","starred_url":"https://api.github.com/users/vzsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vzsg/subscriptions","organizations_url":"https://api.github.com/users/vzsg/orgs","repos_url":"https://api.github.com/users/vzsg/repos","events_url":"https://api.github.com/users/vzsg/events{/privacy}","received_events_url":"https://api.github.com/users/vzsg/received_events","type":"User","site_admin":false},"body":"I don't think it's possible to change this without breaking the API. Perhaps instead of changing this, the cycle could be broken by removing the cached Helper instance?","created_at":"2016-12-30T18:00:48Z","updated_at":"2016-12-30T18:00:49Z","html_url":"https://github.com/vapor/vapor/pull/774#discussion_r94246272","pull_request_url":"https://api.github.com/repos/vapor/vapor/pulls/774","_links":{"self":{"href":"https://api.github.com/repos/vapor/vapor/pulls/comments/94246272"},"html":{"href":"https://github.com/vapor/vapor/pull/774#discussion_r94246272"},"pull_request":{"href":"https://api.github.com/repos/vapor/vapor/pulls/774"}}},"pull_request":{"url":"https://api.github.com/repos/vapor/vapor/pulls/774","id":99749529,"html_url":"https://github.com/vapor/vapor/pull/774","diff_url":"https://github.com/vapor/vapor/pull/774.diff","patch_url":"https://github.com/vapor/vapor/pull/774.patch","issue_url":"https://api.github.com/repos/vapor/vapor/issues/774","number":774,"state":"open","locked":false,"title":"Retain cycle between Request and Auth Header Helper","user":{"login":"fedefrappi","id":433591,"avatar_url":"https://avatars.githubusercontent.com/u/433591?v=3","gravatar_id":"","url":"https://api.github.com/users/fedefrappi","html_url":"https://github.com/fedefrappi","followers_url":"https://api.github.com/users/fedefrappi/followers","following_url":"https://api.github.com/users/fedefrappi/following{/other_user}","gists_url":"https://api.github.com/users/fedefrappi/gists{/gist_id}","starred_url":"https://api.github.com/users/fedefrappi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedefrappi/subscriptions","organizations_url":"https://api.github.com/users/fedefrappi/orgs","repos_url":"https://api.github.com/users/fedefrappi/repos","events_url":"https://api.github.com/users/fedefrappi/events{/privacy}","received_events_url":"https://api.github.com/users/fedefrappi/received_events","type":"User","site_admin":false},"body":"When using Auth Header the Helper class holds a strong reference to Request, which itself holds a strong reference to Helper through the storage dictionary.\r\nIt seems that this causes every request to leak, this is mostly noticeable with large multipart requests. \r\n\r\nThis pull request should break the retain cycle and avoid the leak.  ","created_at":"2016-12-30T12:57:54Z","updated_at":"2016-12-30T18:00:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e172fa109b8ad60150352f66e240cdb1998f32e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vapor/vapor/pulls/774/commits","review_comments_url":"https://api.github.com/repos/vapor/vapor/pulls/774/comments","review_comment_url":"https://api.github.com/repos/vapor/vapor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vapor/vapor/issues/774/comments","statuses_url":"https://api.github.com/repos/vapor/vapor/statuses/36fd01c5855b5cc24f5011b7423d183f08bfcfb1","head":{"label":"AppStyx:master","ref":"master","sha":"36fd01c5855b5cc24f5011b7423d183f08bfcfb1","user":{"login":"AppStyx","id":4068722,"avatar_url":"https://avatars.githubusercontent.com/u/4068722?v=3","gravatar_id":"","url":"https://api.github.com/users/AppStyx","html_url":"https://github.com/AppStyx","followers_url":"https://api.github.com/users/AppStyx/followers","following_url":"https://api.github.com/users/AppStyx/following{/other_user}","gists_url":"https://api.github.com/users/AppStyx/gists{/gist_id}","starred_url":"https://api.github.com/users/AppStyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppStyx/subscriptions","organizations_url":"https://api.github.com/users/AppStyx/orgs","repos_url":"https://api.github.com/users/AppStyx/repos","events_url":"https://api.github.com/users/AppStyx/events{/privacy}","received_events_url":"https://api.github.com/users/AppStyx/received_events","type":"Organization","site_admin":false},"repo":{"id":77685055,"name":"vapor","full_name":"AppStyx/vapor","owner":{"login":"AppStyx","id":4068722,"avatar_url":"https://avatars.githubusercontent.com/u/4068722?v=3","gravatar_id":"","url":"https://api.github.com/users/AppStyx","html_url":"https://github.com/AppStyx","followers_url":"https://api.github.com/users/AppStyx/followers","following_url":"https://api.github.com/users/AppStyx/following{/other_user}","gists_url":"https://api.github.com/users/AppStyx/gists{/gist_id}","starred_url":"https://api.github.com/users/AppStyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppStyx/subscriptions","organizations_url":"https://api.github.com/users/AppStyx/orgs","repos_url":"https://api.github.com/users/AppStyx/repos","events_url":"https://api.github.com/users/AppStyx/events{/privacy}","received_events_url":"https://api.github.com/users/AppStyx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppStyx/vapor","description":"A web framework and server for Swift that works on macOS and Ubuntu.","fork":true,"url":"https://api.github.com/repos/AppStyx/vapor","forks_url":"https://api.github.com/repos/AppStyx/vapor/forks","keys_url":"https://api.github.com/repos/AppStyx/vapor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppStyx/vapor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppStyx/vapor/teams","hooks_url":"https://api.github.com/repos/AppStyx/vapor/hooks","issue_events_url":"https://api.github.com/repos/AppStyx/vapor/issues/events{/number}","events_url":"https://api.github.com/repos/AppStyx/vapor/events","assignees_url":"https://api.github.com/repos/AppStyx/vapor/assignees{/user}","branches_url":"https://api.github.com/repos/AppStyx/vapor/branches{/branch}","tags_url":"https://api.github.com/repos/AppStyx/vapor/tags","blobs_url":"https://api.github.com/repos/AppStyx/vapor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppStyx/vapor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppStyx/vapor/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppStyx/vapor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppStyx/vapor/statuses/{sha}","languages_url":"https://api.github.com/repos/AppStyx/vapor/languages","stargazers_url":"https://api.github.com/repos/AppStyx/vapor/stargazers","contributors_url":"https://api.github.com/repos/AppStyx/vapor/contributors","subscribers_url":"https://api.github.com/repos/AppStyx/vapor/subscribers","subscription_url":"https://api.github.com/repos/AppStyx/vapor/subscription","commits_url":"https://api.github.com/repos/AppStyx/vapor/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppStyx/vapor/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppStyx/vapor/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppStyx/vapor/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppStyx/vapor/contents/{+path}","compare_url":"https://api.github.com/repos/AppStyx/vapor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppStyx/vapor/merges","archive_url":"https://api.github.com/repos/AppStyx/vapor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppStyx/vapor/downloads","issues_url":"https://api.github.com/repos/AppStyx/vapor/issues{/number}","pulls_url":"https://api.github.com/repos/AppStyx/vapor/pulls{/number}","milestones_url":"https://api.github.com/repos/AppStyx/vapor/milestones{/number}","notifications_url":"https://api.github.com/repos/AppStyx/vapor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppStyx/vapor/labels{/name}","releases_url":"https://api.github.com/repos/AppStyx/vapor/releases{/id}","deployments_url":"https://api.github.com/repos/AppStyx/vapor/deployments","created_at":"2016-12-30T12:30:26Z","updated_at":"2016-12-30T12:30:29Z","pushed_at":"2016-12-30T16:14:05Z","git_url":"git://github.com/AppStyx/vapor.git","ssh_url":"git@github.com:AppStyx/vapor.git","clone_url":"https://github.com/AppStyx/vapor.git","svn_url":"https://github.com/AppStyx/vapor","homepage":"https://vapor.codes","size":8666,"stargazers_count":0,"watchers_count":0,"language":"Swift","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":"vapor:master","ref":"master","sha":"74d9fabefe0c816389ca9bc18c14a3f9f5d8e1f9","user":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"repo":{"id":49910095,"name":"vapor","full_name":"vapor/vapor","owner":{"login":"vapor","id":17364220,"avatar_url":"https://avatars.githubusercontent.com/u/17364220?v=3","gravatar_id":"","url":"https://api.github.com/users/vapor","html_url":"https://github.com/vapor","followers_url":"https://api.github.com/users/vapor/followers","following_url":"https://api.github.com/users/vapor/following{/other_user}","gists_url":"https://api.github.com/users/vapor/gists{/gist_id}","starred_url":"https://api.github.com/users/vapor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vapor/subscriptions","organizations_url":"https://api.github.com/users/vapor/orgs","repos_url":"https://api.github.com/users/vapor/repos","events_url":"https://api.github.com/users/vapor/events{/privacy}","received_events_url":"https://api.github.com/users/vapor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vapor/vapor","description":"A web framework and server for Swift that works on macOS and Ubuntu.","fork":false,"url":"https://api.github.com/repos/vapor/vapor","forks_url":"https://api.github.com/repos/vapor/vapor/forks","keys_url":"https://api.github.com/repos/vapor/vapor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vapor/vapor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vapor/vapor/teams","hooks_url":"https://api.github.com/repos/vapor/vapor/hooks","issue_events_url":"https://api.github.com/repos/vapor/vapor/issues/events{/number}","events_url":"https://api.github.com/repos/vapor/vapor/events","assignees_url":"https://api.github.com/repos/vapor/vapor/assignees{/user}","branches_url":"https://api.github.com/repos/vapor/vapor/branches{/branch}","tags_url":"https://api.github.com/repos/vapor/vapor/tags","blobs_url":"https://api.github.com/repos/vapor/vapor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vapor/vapor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vapor/vapor/git/refs{/sha}","trees_url":"https://api.github.com/repos/vapor/vapor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vapor/vapor/statuses/{sha}","languages_url":"https://api.github.com/repos/vapor/vapor/languages","stargazers_url":"https://api.github.com/repos/vapor/vapor/stargazers","contributors_url":"https://api.github.com/repos/vapor/vapor/contributors","subscribers_url":"https://api.github.com/repos/vapor/vapor/subscribers","subscription_url":"https://api.github.com/repos/vapor/vapor/subscription","commits_url":"https://api.github.com/repos/vapor/vapor/commits{/sha}","git_commits_url":"https://api.github.com/repos/vapor/vapor/git/commits{/sha}","comments_url":"https://api.github.com/repos/vapor/vapor/comments{/number}","issue_comment_url":"https://api.github.com/repos/vapor/vapor/issues/comments{/number}","contents_url":"https://api.github.com/repos/vapor/vapor/contents/{+path}","compare_url":"https://api.github.com/repos/vapor/vapor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vapor/vapor/merges","archive_url":"https://api.github.com/repos/vapor/vapor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vapor/vapor/downloads","issues_url":"https://api.github.com/repos/vapor/vapor/issues{/number}","pulls_url":"https://api.github.com/repos/vapor/vapor/pulls{/number}","milestones_url":"https://api.github.com/repos/vapor/vapor/milestones{/number}","notifications_url":"https://api.github.com/repos/vapor/vapor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vapor/vapor/labels{/name}","releases_url":"https://api.github.com/repos/vapor/vapor/releases{/id}","deployments_url":"https://api.github.com/repos/vapor/vapor/deployments","created_at":"2016-01-18T22:37:52Z","updated_at":"2016-12-30T17:57:16Z","pushed_at":"2016-12-30T16:14:47Z","git_url":"git://github.com/vapor/vapor.git","ssh_url":"git@github.com:vapor/vapor.git","clone_url":"https://github.com/vapor/vapor.git","svn_url":"https://github.com/vapor/vapor","homepage":"https://vapor.codes","size":8666,"stargazers_count":7967,"watchers_count":7967,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":457,"mirror_url":null,"open_issues_count":59,"forks":457,"open_issues":59,"watchers":7967,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vapor/vapor/pulls/774"},"html":{"href":"https://github.com/vapor/vapor/pull/774"},"issue":{"href":"https://api.github.com/repos/vapor/vapor/issues/774"},"comments":{"href":"https://api.github.com/repos/vapor/vapor/issues/774/comments"},"review_comments":{"href":"https://api.github.com/repos/vapor/vapor/pulls/774/comments"},"review_comment":{"href":"https://api.github.com/repos/vapor/vapor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vapor/vapor/pulls/774/commits"},"statuses":{"href":"https://api.github.com/repos/vapor/vapor/statuses/36fd01c5855b5cc24f5011b7423d183f08bfcfb1"}}}}
{"actor":{"display_login":"vzsg"}}