{"action":"created","comment":{"url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/comments/194036634","pull_request_review_id":127135504,"id":194036634,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDAzNjYzNA==","diff_hunk":"@@ -0,0 +1,120 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.IO;\n+using System.Text;\n+using System.Web;\n+using Lucca.Logs.Shared;\n+using StackExchange.Exceptional;\n+\n+namespace Lucca.Logs.AspnetLegacy\n+{\n+    public sealed class HttpContextParserLegacy : IHttpContextParser\n+    {\n+        private readonly IHttpContextAccessor _httpContextAccessor;\n+\n+        public HttpContextParserLegacy(IHttpContextAccessor httpContextAccessor)\n+        {\n+            _httpContextAccessor = httpContextAccessor;\n+        }\n+\n+        private HttpRequest Request\n+        {\n+            get\n+            {\n+                HttpRequest request = null;\n+                try\n+                {\n+                    request = _httpContextAccessor?.HttpContext?.Request;\n+                }\n+                catch (Exception e)\n+                {\n+                   // ignored\n+                }\n+                return request;\n+            }\n+        }\n+\n+        public string ExtractUrl(UriPart uriPart)\n+        {\n+            if (Request == null)\n+                return null;\n+\n+            var urlBuilder = new StringBuilder();\n+            if ((uriPart & UriPart.Scheme) == UriPart.Scheme && !String.IsNullOrWhiteSpace(Request.Url.Scheme))\n+            {\n+                urlBuilder.Append(Request.Url.Scheme + \"://\");\n+            }\n+            if ((uriPart & UriPart.Host) == UriPart.Host)\n+            {\n+                urlBuilder.Append(Request.Url.DnsSafeHost);\n+            }\n+            if ((uriPart & UriPart.Port) == UriPart.Port && Request.Url.Port > 0)\n+            {\n+                urlBuilder.Append(\":\" + Request.Url.Port);\n+            }\n+            if ((uriPart & UriPart.Path) == UriPart.Path)\n+            {\n+                urlBuilder.Append(Request.Url.LocalPath);\n+            }\n+            if ((uriPart & UriPart.Query) == UriPart.Query)\n+            {\n+                urlBuilder.Append(Request.Url.Query);\n+            }\n+            return urlBuilder.ToString();\n+        }\n+\n+        public string Method => Request?.HttpMethod;\n+\n+        public bool ContainsHeader(string header)\n+        {\n+            return Request?.Headers.Get(header) != null;\n+        }\n+\n+        public string GetHEader(string header) => Request?.Headers.Get(header);\n+\n+        public string Ip => Request?.UserHostAddress;\n+\n+        public string TryGetBodyContent()\n+        {\n+            if (Request == null || !(Request.InputStream.Length <= 0))","path":"Lucca.Logs.AspnetLegacy/HttpContextParserLegacy.cs","position":79,"original_position":79,"commit_id":"33377058f0adc331d6fc96231f06e92db97e7a08","original_commit_id":"33377058f0adc331d6fc96231f06e92db97e7a08","user":{"login":"LuccaIntegration","id":24569360,"node_id":"MDQ6VXNlcjI0NTY5MzYw","avatar_url":"https://avatars0.githubusercontent.com/u/24569360?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaIntegration","html_url":"https://github.com/LuccaIntegration","followers_url":"https://api.github.com/users/LuccaIntegration/followers","following_url":"https://api.github.com/users/LuccaIntegration/following{/other_user}","gists_url":"https://api.github.com/users/LuccaIntegration/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaIntegration/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaIntegration/subscriptions","organizations_url":"https://api.github.com/users/LuccaIntegration/orgs","repos_url":"https://api.github.com/users/LuccaIntegration/repos","events_url":"https://api.github.com/users/LuccaIntegration/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaIntegration/received_events","type":"User","site_admin":false},"body":"![MINOR](https://sonarsource.github.io/sonar-github/severity-minor.png 'Severity: MINOR') Use the opposite operator ('>') instead. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonarcloud.io/coding_rules#rule_key=csharpsquid%3AS1940)\n","created_at":"2018-06-08T12:07:29Z","updated_at":"2018-06-08T12:07:29Z","html_url":"https://github.com/LuccaSA/Lucca.Logs/pull/5#discussion_r194036634","pull_request_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/comments/194036634"},"html":{"href":"https://github.com/LuccaSA/Lucca.Logs/pull/5#discussion_r194036634"},"pull_request":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5","id":192774822,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNzc0ODIy","html_url":"https://github.com/LuccaSA/Lucca.Logs/pull/5","diff_url":"https://github.com/LuccaSA/Lucca.Logs/pull/5.diff","patch_url":"https://github.com/LuccaSA/Lucca.Logs/pull/5.patch","issue_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/5","number":5,"state":"open","locked":false,"title":"Prepares dual log target (netcore21/net461)","user":{"login":"rducom","id":5228175,"node_id":"MDQ6VXNlcjUyMjgxNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/5228175?v=4","gravatar_id":"","url":"https://api.github.com/users/rducom","html_url":"https://github.com/rducom","followers_url":"https://api.github.com/users/rducom/followers","following_url":"https://api.github.com/users/rducom/following{/other_user}","gists_url":"https://api.github.com/users/rducom/gists{/gist_id}","starred_url":"https://api.github.com/users/rducom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rducom/subscriptions","organizations_url":"https://api.github.com/users/rducom/orgs","repos_url":"https://api.github.com/users/rducom/repos","events_url":"https://api.github.com/users/rducom/events{/privacy}","received_events_url":"https://api.github.com/users/rducom/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-05T17:00:45Z","updated_at":"2018-06-08T12:07:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b7af2c40feca7d348915355303d681fd1cac596","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5/commits","review_comments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5/comments","review_comment_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/5/comments","statuses_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/statuses/33377058f0adc331d6fc96231f06e92db97e7a08","head":{"label":"LuccaSA:dual.target","ref":"dual.target","sha":"33377058f0adc331d6fc96231f06e92db97e7a08","user":{"login":"LuccaSA","id":2686158,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODYxNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"repo":{"id":106560767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY1NjA3Njc=","name":"Lucca.Logs","full_name":"LuccaSA/Lucca.Logs","owner":{"login":"LuccaSA","id":2686158,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODYxNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LuccaSA/Lucca.Logs","description":"Lucca.Logs","fork":false,"url":"https://api.github.com/repos/LuccaSA/Lucca.Logs","forks_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/forks","keys_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/teams","hooks_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/hooks","issue_events_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/events{/number}","events_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/events","assignees_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/assignees{/user}","branches_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/branches{/branch}","tags_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/tags","blobs_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/statuses/{sha}","languages_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/languages","stargazers_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/stargazers","contributors_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/contributors","subscribers_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/subscribers","subscription_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/subscription","commits_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/contents/{+path}","compare_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/merges","archive_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/downloads","issues_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues{/number}","pulls_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls{/number}","milestones_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/milestones{/number}","notifications_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/labels{/name}","releases_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/releases{/id}","deployments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/deployments","created_at":"2017-10-11T13:52:46Z","updated_at":"2018-06-05T14:44:42Z","pushed_at":"2018-06-08T12:04:57Z","git_url":"git://github.com/LuccaSA/Lucca.Logs.git","ssh_url":"git@github.com:LuccaSA/Lucca.Logs.git","clone_url":"https://github.com/LuccaSA/Lucca.Logs.git","svn_url":"https://github.com/LuccaSA/Lucca.Logs","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"LuccaSA:master","ref":"master","sha":"a0ea75466e546a9c2c7ad69e30d63be9a2ac07e2","user":{"login":"LuccaSA","id":2686158,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODYxNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"repo":{"id":106560767,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY1NjA3Njc=","name":"Lucca.Logs","full_name":"LuccaSA/Lucca.Logs","owner":{"login":"LuccaSA","id":2686158,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2ODYxNTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2686158?v=4","gravatar_id":"","url":"https://api.github.com/users/LuccaSA","html_url":"https://github.com/LuccaSA","followers_url":"https://api.github.com/users/LuccaSA/followers","following_url":"https://api.github.com/users/LuccaSA/following{/other_user}","gists_url":"https://api.github.com/users/LuccaSA/gists{/gist_id}","starred_url":"https://api.github.com/users/LuccaSA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuccaSA/subscriptions","organizations_url":"https://api.github.com/users/LuccaSA/orgs","repos_url":"https://api.github.com/users/LuccaSA/repos","events_url":"https://api.github.com/users/LuccaSA/events{/privacy}","received_events_url":"https://api.github.com/users/LuccaSA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LuccaSA/Lucca.Logs","description":"Lucca.Logs","fork":false,"url":"https://api.github.com/repos/LuccaSA/Lucca.Logs","forks_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/forks","keys_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/teams","hooks_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/hooks","issue_events_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/events{/number}","events_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/events","assignees_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/assignees{/user}","branches_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/branches{/branch}","tags_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/tags","blobs_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/statuses/{sha}","languages_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/languages","stargazers_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/stargazers","contributors_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/contributors","subscribers_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/subscribers","subscription_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/subscription","commits_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/contents/{+path}","compare_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/merges","archive_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/downloads","issues_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues{/number}","pulls_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls{/number}","milestones_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/milestones{/number}","notifications_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/labels{/name}","releases_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/releases{/id}","deployments_url":"https://api.github.com/repos/LuccaSA/Lucca.Logs/deployments","created_at":"2017-10-11T13:52:46Z","updated_at":"2018-06-05T14:44:42Z","pushed_at":"2018-06-08T12:04:57Z","git_url":"git://github.com/LuccaSA/Lucca.Logs.git","ssh_url":"git@github.com:LuccaSA/Lucca.Logs.git","clone_url":"https://github.com/LuccaSA/Lucca.Logs.git","svn_url":"https://github.com/LuccaSA/Lucca.Logs","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5"},"html":{"href":"https://github.com/LuccaSA/Lucca.Logs/pull/5"},"issue":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/5"},"comments":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/LuccaSA/Lucca.Logs/statuses/33377058f0adc331d6fc96231f06e92db97e7a08"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"LuccaIntegration"}}