{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/35170049","id":35170049,"diff_hunk":"@@ -37,11 +37,15 @@\n \n int grpc_compression_algorithm_parse(const char* name,\n                                      grpc_compression_algorithm *algorithm) {\n-  if (strcmp(name, \"none\") == 0) {\n+  /* we use strncmp not only because it's safer (even though in this case it\n+   * doesn't matter, given that we are comparing against string literals, but\n+   * because this way we needn't have \"name\" nil-terminated (useful for slice\n+   * data, for example) */\n+  if (strncmp(name, \"none\", 4) == 0) {\n     *algorithm = GRPC_COMPRESS_NONE;\n-  } else if (strcmp(name, \"gzip\") == 0) {","path":"src/core/compression/algorithm.c","position":null,"original_position":11,"commit_id":"8ec09f6530938c6126a6579ce85ee07dbf71d785","original_commit_id":"c0a09015b17d8db1ea6bee0cba5d868c7f6f6fca","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"body":"We should. Done.","created_at":"2015-07-22T00:19:23Z","updated_at":"2015-07-22T00:19:23Z","html_url":"https://github.com/grpc/grpc/pull/2533#discussion_r35170049","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/2533","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/35170049"},"html":{"href":"https://github.com/grpc/grpc/pull/2533#discussion_r35170049"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2533"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/2533","id":40331326,"html_url":"https://github.com/grpc/grpc/pull/2533","diff_url":"https://github.com/grpc/grpc/pull/2533.diff","patch_url":"https://github.com/grpc/grpc/pull/2533.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/2533","number":2533,"state":"open","locked":false,"title":"Compression accept encoding propagation","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"body":"grpc-accept-encoding information is now propagated through the metadata","created_at":"2015-07-20T08:29:45Z","updated_at":"2015-07-22T00:19:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"303db5cb5018a8f903edcf118e8a571b22acc22b","assignee":{"login":"ctiller","id":10120821,"avatar_url":"https://avatars.githubusercontent.com/u/10120821?v=3","gravatar_id":"","url":"https://api.github.com/users/ctiller","html_url":"https://github.com/ctiller","followers_url":"https://api.github.com/users/ctiller/followers","following_url":"https://api.github.com/users/ctiller/following{/other_user}","gists_url":"https://api.github.com/users/ctiller/gists{/gist_id}","starred_url":"https://api.github.com/users/ctiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctiller/subscriptions","organizations_url":"https://api.github.com/users/ctiller/orgs","repos_url":"https://api.github.com/users/ctiller/repos","events_url":"https://api.github.com/users/ctiller/events{/privacy}","received_events_url":"https://api.github.com/users/ctiller/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/grpc/grpc/milestones/25","html_url":"https://github.com/grpc/grpc/milestones/Beta","labels_url":"https://api.github.com/repos/grpc/grpc/milestones/25/labels","id":1134869,"number":25,"title":"Beta","description":"","creator":{"login":"ctiller","id":10120821,"avatar_url":"https://avatars.githubusercontent.com/u/10120821?v=3","gravatar_id":"","url":"https://api.github.com/users/ctiller","html_url":"https://github.com/ctiller","followers_url":"https://api.github.com/users/ctiller/followers","following_url":"https://api.github.com/users/ctiller/following{/other_user}","gists_url":"https://api.github.com/users/ctiller/gists{/gist_id}","starred_url":"https://api.github.com/users/ctiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctiller/subscriptions","organizations_url":"https://api.github.com/users/ctiller/orgs","repos_url":"https://api.github.com/users/ctiller/repos","events_url":"https://api.github.com/users/ctiller/events{/privacy}","received_events_url":"https://api.github.com/users/ctiller/received_events","type":"User","site_admin":false},"open_issues":246,"closed_issues":125,"state":"open","created_at":"2015-05-26T22:29:20Z","updated_at":"2015-07-22T00:14:35Z","due_on":"2015-07-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/2533/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/2533/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/2533/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/8ec09f6530938c6126a6579ce85ee07dbf71d785","head":{"label":"dgquintas:compression-accept-encoding","ref":"compression-accept-encoding","sha":"8ec09f6530938c6126a6579ce85ee07dbf71d785","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"repo":{"id":34546298,"name":"grpc","full_name":"dgquintas/grpc","owner":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgquintas/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/dgquintas/grpc","forks_url":"https://api.github.com/repos/dgquintas/grpc/forks","keys_url":"https://api.github.com/repos/dgquintas/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgquintas/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgquintas/grpc/teams","hooks_url":"https://api.github.com/repos/dgquintas/grpc/hooks","issue_events_url":"https://api.github.com/repos/dgquintas/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/dgquintas/grpc/events","assignees_url":"https://api.github.com/repos/dgquintas/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/dgquintas/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/dgquintas/grpc/tags","blobs_url":"https://api.github.com/repos/dgquintas/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgquintas/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgquintas/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgquintas/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgquintas/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/dgquintas/grpc/languages","stargazers_url":"https://api.github.com/repos/dgquintas/grpc/stargazers","contributors_url":"https://api.github.com/repos/dgquintas/grpc/contributors","subscribers_url":"https://api.github.com/repos/dgquintas/grpc/subscribers","subscription_url":"https://api.github.com/repos/dgquintas/grpc/subscription","commits_url":"https://api.github.com/repos/dgquintas/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgquintas/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgquintas/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgquintas/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgquintas/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/dgquintas/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgquintas/grpc/merges","archive_url":"https://api.github.com/repos/dgquintas/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgquintas/grpc/downloads","issues_url":"https://api.github.com/repos/dgquintas/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/dgquintas/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/dgquintas/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/dgquintas/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgquintas/grpc/labels{/name}","releases_url":"https://api.github.com/repos/dgquintas/grpc/releases{/id}","created_at":"2015-04-24T23:07:11Z","updated_at":"2015-04-24T23:10:08Z","pushed_at":"2015-07-22T00:18:49Z","git_url":"git://github.com/dgquintas/grpc.git","ssh_url":"git@github.com:dgquintas/grpc.git","clone_url":"https://github.com/dgquintas/grpc.git","svn_url":"https://github.com/dgquintas/grpc","homepage":"","size":37649,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"a314f2cab5069895b2cbec19c103501a32fcd999","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","created_at":"2014-12-08T18:58:53Z","updated_at":"2015-07-21T22:59:12Z","pushed_at":"2015-07-22T00:18:49Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"","size":62996,"stargazers_count":2895,"watchers_count":2895,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":419,"mirror_url":null,"open_issues_count":415,"forks":419,"open_issues":415,"watchers":2895,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2533"},"html":{"href":"https://github.com/grpc/grpc/pull/2533"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/2533"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/2533/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2533/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2533/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/8ec09f6530938c6126a6579ce85ee07dbf71d785"}}}}