{"action":"created","comment":{"url":"https://api.github.com/repos/measurement-factory/squid/pulls/comments/198324877","pull_request_review_id":132222469,"id":198324877,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODMyNDg3Nw==","diff_hunk":"@@ -1637,6 +1631,55 @@ ClientHttpRequest::loggingEntry(StoreEntry *newEntry)\n         loggingEntry_->lock(\"ClientHttpRequest::loggingEntry\");\n }\n \n+void\n+ClientHttpRequest::initRequest(HttpRequest *aRequest)\n+{\n+    assert(aRequest);\n+    assert(!request);\n+    // TODO: also reset uri if possible\n+    resetRequest(aRequest, false);","path":"src/client_side_request.cc","position":52,"original_position":52,"commit_id":"693eee4da6fab2c8a4257fceb65f219d7e52ca63","original_commit_id":"693eee4da6fab2c8a4257fceb65f219d7e52ca63","user":{"login":"rousskov","id":1084944,"node_id":"MDQ6VXNlcjEwODQ5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1084944?v=4","gravatar_id":"","url":"https://api.github.com/users/rousskov","html_url":"https://github.com/rousskov","followers_url":"https://api.github.com/users/rousskov/followers","following_url":"https://api.github.com/users/rousskov/following{/other_user}","gists_url":"https://api.github.com/users/rousskov/gists{/gist_id}","starred_url":"https://api.github.com/users/rousskov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rousskov/subscriptions","organizations_url":"https://api.github.com/users/rousskov/orgs","repos_url":"https://api.github.com/users/rousskov/repos","events_url":"https://api.github.com/users/rousskov/events{/privacy}","received_events_url":"https://api.github.com/users/rousskov/received_events","type":"User","site_admin":false},"body":"This is the only place where we are _not_ resetting the URI. This is also the only place where we are not actually _resetting_ the request (we are setting the first request, not replacing the old one). This resetRequest() abuse has bothered me before but this new boolean parameter is the last straw -- we should split resetRequest() into two methods:\r\n\r\n1. resetRequest(newRequest) -- a public method called to replace the old request with a new one. Always resets the `uri` member as well. Very similar to the current `resetRequest(..., true)` usage.\r\n1. assignRequest(aRequest) -- a private method that performs the common tasks of initRequest() and resetRequest(). It assigns the request and calls setLogUriToRequestUri() while asserting that the current request is nil (either because it did not exist or because it was just cleared by the caller).","created_at":"2018-06-26T23:12:13Z","updated_at":"2018-06-26T23:35:15Z","html_url":"https://github.com/measurement-factory/squid/pull/5#discussion_r198324877","pull_request_url":"https://api.github.com/repos/measurement-factory/squid/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/comments/198324877"},"html":{"href":"https://github.com/measurement-factory/squid/pull/5#discussion_r198324877"},"pull_request":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/measurement-factory/squid/pulls/5","id":195143829,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MTQzODI5","html_url":"https://github.com/measurement-factory/squid/pull/5","diff_url":"https://github.com/measurement-factory/squid/pull/5.diff","patch_url":"https://github.com/measurement-factory/squid/pull/5.patch","issue_url":"https://api.github.com/repos/measurement-factory/squid/issues/5","number":5,"state":"open","locked":false,"title":"Fix %>ru logging of huge URLs","user":{"login":"eduard-bagdasaryan","id":13069213,"node_id":"MDQ6VXNlcjEzMDY5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/13069213?v=4","gravatar_id":"","url":"https://api.github.com/users/eduard-bagdasaryan","html_url":"https://github.com/eduard-bagdasaryan","followers_url":"https://api.github.com/users/eduard-bagdasaryan/followers","following_url":"https://api.github.com/users/eduard-bagdasaryan/following{/other_user}","gists_url":"https://api.github.com/users/eduard-bagdasaryan/gists{/gist_id}","starred_url":"https://api.github.com/users/eduard-bagdasaryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduard-bagdasaryan/subscriptions","organizations_url":"https://api.github.com/users/eduard-bagdasaryan/orgs","repos_url":"https://api.github.com/users/eduard-bagdasaryan/repos","events_url":"https://api.github.com/users/eduard-bagdasaryan/events{/privacy}","received_events_url":"https://api.github.com/users/eduard-bagdasaryan/received_events","type":"User","site_admin":false},"body":"When dealing with an HTTP request header that Squid can parse but that\r\ncontains request URI length exceeding the 8K limit, Squid should log the\r\nURL (prefix) instead of a dash. Logging the URL helps with triaging\r\nthese unusual requests. The older %ru (LFT_REQUEST_URI) was already\r\nlogging these huge URLs, but %>ru (LFT_CLIENT_REQ_URI) was logging a\r\ndash. Now both log the URL (or its prefix).\r\n\r\nAs a side effect, %>ru now also logs error:request-too-large and other\r\nSquid-specific pseudo-URLs, as appropriate.\r\n\r\nAlso refactored request- and URI-recording code to reduces chances of\r\nsimilar inconsistencies reappearing in the future.","created_at":"2018-06-15T11:07:31Z","updated_at":"2018-06-26T23:35:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/measurement-factory/squid/pulls/5/commits","review_comments_url":"https://api.github.com/repos/measurement-factory/squid/pulls/5/comments","review_comment_url":"https://api.github.com/repos/measurement-factory/squid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/measurement-factory/squid/issues/5/comments","statuses_url":"https://api.github.com/repos/measurement-factory/squid/statuses/693eee4da6fab2c8a4257fceb65f219d7e52ca63","head":{"label":"measurement-factory:SQUID-377-log-huge-URL-ru","ref":"SQUID-377-log-huge-URL-ru","sha":"693eee4da6fab2c8a4257fceb65f219d7e52ca63","user":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":97358214,"node_id":"MDEwOlJlcG9zaXRvcnk5NzM1ODIxNA==","name":"squid","full_name":"measurement-factory/squid","owner":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/squid","description":"Squid Web Proxy Cache","fork":true,"url":"https://api.github.com/repos/measurement-factory/squid","forks_url":"https://api.github.com/repos/measurement-factory/squid/forks","keys_url":"https://api.github.com/repos/measurement-factory/squid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/squid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/squid/teams","hooks_url":"https://api.github.com/repos/measurement-factory/squid/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/squid/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/squid/events","assignees_url":"https://api.github.com/repos/measurement-factory/squid/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/squid/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/squid/tags","blobs_url":"https://api.github.com/repos/measurement-factory/squid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/squid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/squid/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/squid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/squid/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/squid/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/squid/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/squid/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/squid/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/squid/subscription","commits_url":"https://api.github.com/repos/measurement-factory/squid/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/squid/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/squid/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/squid/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/squid/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/squid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/squid/merges","archive_url":"https://api.github.com/repos/measurement-factory/squid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/squid/downloads","issues_url":"https://api.github.com/repos/measurement-factory/squid/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/squid/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/squid/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/squid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/squid/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/squid/releases{/id}","deployments_url":"https://api.github.com/repos/measurement-factory/squid/deployments","created_at":"2017-07-16T03:46:50Z","updated_at":"2018-06-26T04:41:51Z","pushed_at":"2018-06-26T16:01:58Z","git_url":"git://github.com/measurement-factory/squid.git","ssh_url":"git@github.com:measurement-factory/squid.git","clone_url":"https://github.com/measurement-factory/squid.git","svn_url":"https://github.com/measurement-factory/squid","homepage":"http://www.squid-cache.org/","size":170517,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"measurement-factory:bag14","ref":"bag14","sha":"6deb13fed73215e75725412d8a3433cb2ea278ad","user":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":97358214,"node_id":"MDEwOlJlcG9zaXRvcnk5NzM1ODIxNA==","name":"squid","full_name":"measurement-factory/squid","owner":{"login":"measurement-factory","id":5461029,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjEwMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/5461029?v=4","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/squid","description":"Squid Web Proxy Cache","fork":true,"url":"https://api.github.com/repos/measurement-factory/squid","forks_url":"https://api.github.com/repos/measurement-factory/squid/forks","keys_url":"https://api.github.com/repos/measurement-factory/squid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/squid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/squid/teams","hooks_url":"https://api.github.com/repos/measurement-factory/squid/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/squid/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/squid/events","assignees_url":"https://api.github.com/repos/measurement-factory/squid/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/squid/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/squid/tags","blobs_url":"https://api.github.com/repos/measurement-factory/squid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/squid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/squid/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/squid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/squid/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/squid/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/squid/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/squid/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/squid/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/squid/subscription","commits_url":"https://api.github.com/repos/measurement-factory/squid/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/squid/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/squid/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/squid/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/squid/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/squid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/squid/merges","archive_url":"https://api.github.com/repos/measurement-factory/squid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/squid/downloads","issues_url":"https://api.github.com/repos/measurement-factory/squid/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/squid/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/squid/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/squid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/squid/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/squid/releases{/id}","deployments_url":"https://api.github.com/repos/measurement-factory/squid/deployments","created_at":"2017-07-16T03:46:50Z","updated_at":"2018-06-26T04:41:51Z","pushed_at":"2018-06-26T16:01:58Z","git_url":"git://github.com/measurement-factory/squid.git","ssh_url":"git@github.com:measurement-factory/squid.git","clone_url":"https://github.com/measurement-factory/squid.git","svn_url":"https://github.com/measurement-factory/squid","homepage":"http://www.squid-cache.org/","size":170517,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/5"},"html":{"href":"https://github.com/measurement-factory/squid/pull/5"},"issue":{"href":"https://api.github.com/repos/measurement-factory/squid/issues/5"},"comments":{"href":"https://api.github.com/repos/measurement-factory/squid/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/measurement-factory/squid/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/measurement-factory/squid/statuses/693eee4da6fab2c8a4257fceb65f219d7e52ca63"}},"author_association":"NONE"}}
{"actor":{"display_login":"rousskov"}}