{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Localization/pulls/comments/42797607","id":42797607,"diff_hunk":"@@ -49,28 +51,12 @@ public override Task<RequestCulture> DetermineRequestCulture(HttpContext httpCon\n             var orderedLanguages = languages.OrderByDescending(h => h, StringWithQualityHeaderValueComparer.QualityComparer)\n                 .ToList();\n \n-            foreach (var language in orderedLanguages)\n+            if (orderedLanguages.Any())\n             {\n-                // Allow empty string values as they map to InvariantCulture, whereas null culture values will throw in\n-                // the CultureInfo ctor\n-                if (language.Value != null)\n-                {\n-                    var culture = CultureInfoCache.GetCultureInfo(language.Value);\n-                    if (culture != null)\n-                    {\n-                        var requestCulture = new RequestCulture(culture);\n-\n-                        requestCulture = ValidateRequestCulture(requestCulture);\n-\n-                        if (requestCulture?.Culture == culture)\n-                        {\n-                            return Task.FromResult(requestCulture);\n-                        }\n-                    }\n-                }\n+                return Task.FromResult(new ProviderResultCulture(orderedLanguages.Select(x => x.Value).ToList()));","path":"src/Microsoft.AspNet.Localization/AcceptLanguageHeaderRequestCultureProvider.cs","position":51,"original_position":51,"commit_id":"64d35bae60a7477233d6863010417c15784ef0f6","original_commit_id":"64d35bae60a7477233d6863010417c15784ef0f6","user":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"body":"You can fold this into the previous `.Select` and avoid creating more lists","created_at":"2015-10-22T19:55:18Z","updated_at":"2015-10-22T19:55:18Z","html_url":"https://github.com/aspnet/Localization/pull/120#discussion_r42797607","pull_request_url":"https://api.github.com/repos/aspnet/Localization/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/comments/42797607"},"html":{"href":"https://github.com/aspnet/Localization/pull/120#discussion_r42797607"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Localization/pulls/120","id":48137088,"html_url":"https://github.com/aspnet/Localization/pull/120","diff_url":"https://github.com/aspnet/Localization/pull/120.diff","patch_url":"https://github.com/aspnet/Localization/pull/120.patch","issue_url":"https://api.github.com/repos/aspnet/Localization/issues/120","number":120,"state":"open","locked":false,"title":"[Design]Fix #111: Design changes to known/allowed culture list and cache","user":{"login":"kirthik","id":1267650,"avatar_url":"https://avatars.githubusercontent.com/u/1267650?v=3","gravatar_id":"","url":"https://api.github.com/users/kirthik","html_url":"https://github.com/kirthik","followers_url":"https://api.github.com/users/kirthik/followers","following_url":"https://api.github.com/users/kirthik/following{/other_user}","gists_url":"https://api.github.com/users/kirthik/gists{/gist_id}","starred_url":"https://api.github.com/users/kirthik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirthik/subscriptions","organizations_url":"https://api.github.com/users/kirthik/orgs","repos_url":"https://api.github.com/users/kirthik/repos","events_url":"https://api.github.com/users/kirthik/events{/privacy}","received_events_url":"https://api.github.com/users/kirthik/received_events","type":"User","site_admin":false},"body":"cc @Eilon and @DamianEdwards ","created_at":"2015-10-19T22:51:48Z","updated_at":"2015-10-22T19:55:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd91eccce783d0bba67cae1eff300602c845be8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Localization/pulls/120/commits","review_comments_url":"https://api.github.com/repos/aspnet/Localization/pulls/120/comments","review_comment_url":"https://api.github.com/repos/aspnet/Localization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Localization/issues/120/comments","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/64d35bae60a7477233d6863010417c15784ef0f6","head":{"label":"aspnet:fix111","ref":"fix111","sha":"64d35bae60a7477233d6863010417c15784ef0f6","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35138798,"name":"Localization","full_name":"aspnet/Localization","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Localization","description":"Interfaces and implementations for providing localization in applications. ","fork":false,"url":"https://api.github.com/repos/aspnet/Localization","forks_url":"https://api.github.com/repos/aspnet/Localization/forks","keys_url":"https://api.github.com/repos/aspnet/Localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Localization/teams","hooks_url":"https://api.github.com/repos/aspnet/Localization/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Localization/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Localization/events","assignees_url":"https://api.github.com/repos/aspnet/Localization/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Localization/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Localization/tags","blobs_url":"https://api.github.com/repos/aspnet/Localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Localization/languages","stargazers_url":"https://api.github.com/repos/aspnet/Localization/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Localization/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Localization/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Localization/subscription","commits_url":"https://api.github.com/repos/aspnet/Localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Localization/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Localization/merges","archive_url":"https://api.github.com/repos/aspnet/Localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Localization/downloads","issues_url":"https://api.github.com/repos/aspnet/Localization/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Localization/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Localization/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Localization/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Localization/releases{/id}","created_at":"2015-05-06T04:07:17Z","updated_at":"2015-10-21T19:30:58Z","pushed_at":"2015-10-22T08:08:17Z","git_url":"git://github.com/aspnet/Localization.git","ssh_url":"git@github.com:aspnet/Localization.git","clone_url":"https://github.com/aspnet/Localization.git","svn_url":"https://github.com/aspnet/Localization","homepage":null,"size":1131,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":14,"forks":7,"open_issues":14,"watchers":21,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"90116ddd78a8a9f3e5e5ba68500b799e9dc3ec8b","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35138798,"name":"Localization","full_name":"aspnet/Localization","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Localization","description":"Interfaces and implementations for providing localization in applications. ","fork":false,"url":"https://api.github.com/repos/aspnet/Localization","forks_url":"https://api.github.com/repos/aspnet/Localization/forks","keys_url":"https://api.github.com/repos/aspnet/Localization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Localization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Localization/teams","hooks_url":"https://api.github.com/repos/aspnet/Localization/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Localization/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Localization/events","assignees_url":"https://api.github.com/repos/aspnet/Localization/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Localization/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Localization/tags","blobs_url":"https://api.github.com/repos/aspnet/Localization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Localization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Localization/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Localization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Localization/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Localization/languages","stargazers_url":"https://api.github.com/repos/aspnet/Localization/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Localization/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Localization/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Localization/subscription","commits_url":"https://api.github.com/repos/aspnet/Localization/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Localization/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Localization/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Localization/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Localization/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Localization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Localization/merges","archive_url":"https://api.github.com/repos/aspnet/Localization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Localization/downloads","issues_url":"https://api.github.com/repos/aspnet/Localization/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Localization/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Localization/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Localization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Localization/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Localization/releases{/id}","created_at":"2015-05-06T04:07:17Z","updated_at":"2015-10-21T19:30:58Z","pushed_at":"2015-10-22T08:08:17Z","git_url":"git://github.com/aspnet/Localization.git","ssh_url":"git@github.com:aspnet/Localization.git","clone_url":"https://github.com/aspnet/Localization.git","svn_url":"https://github.com/aspnet/Localization","homepage":null,"size":1131,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":14,"forks":7,"open_issues":14,"watchers":21,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/120"},"html":{"href":"https://github.com/aspnet/Localization/pull/120"},"issue":{"href":"https://api.github.com/repos/aspnet/Localization/issues/120"},"comments":{"href":"https://api.github.com/repos/aspnet/Localization/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Localization/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Localization/statuses/64d35bae60a7477233d6863010417c15784ef0f6"}}}}