{"action":"created","comment":{"url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments/93963761","pull_request_review_id":14492311,"id":93963761,"diff_hunk":"@@ -464,8 +466,27 @@ ngx_http_lua_rewrite_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n         return NGX_CONF_ERROR;\n     }\n \n-    if (llcf->rewrite_handler) {\n-        return \"is duplicate\";\n+    if (handlers == NULL) {\n+        handlers = ngx_array_create(cf->pool, 1,\n+                                    sizeof(ngx_http_lua_phase_handler_t));\n+\n+        if (handlers == NULL) {\n+            return NGX_CONF_ERROR;\n+        }\n+\n+        llcf->rewrite_handlers = handlers;\n+    }\n+\n+    if (handlers->nelts >= NGX_HTTP_LUA_MAX_HANDLER_EACH_PHASE) {\n+        ngx_conf_log_error(NGX_LOG_ERR, cf, 0,\n+                           \"the number of rewrite_by_lua* directives exceeds %d\",","path":"src/ngx_http_lua_directive.c","position":36,"original_position":36,"commit_id":"d1b71a317229d180ba07479c0f33572d497f33d6","original_commit_id":"d1b71a317229d180ba07479c0f33572d497f33d6","user":{"login":"agentzh","id":56241,"avatar_url":"https://avatars.githubusercontent.com/u/56241?v=3","gravatar_id":"","url":"https://api.github.com/users/agentzh","html_url":"https://github.com/agentzh","followers_url":"https://api.github.com/users/agentzh/followers","following_url":"https://api.github.com/users/agentzh/following{/other_user}","gists_url":"https://api.github.com/users/agentzh/gists{/gist_id}","starred_url":"https://api.github.com/users/agentzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agentzh/subscriptions","organizations_url":"https://api.github.com/users/agentzh/orgs","repos_url":"https://api.github.com/users/agentzh/repos","events_url":"https://api.github.com/users/agentzh/events{/privacy}","received_events_url":"https://api.github.com/users/agentzh/received_events","type":"User","site_admin":false},"body":"This line exceeds 80 columns. Please use the `ngx-releng` tool to check such things. Thank you :)","created_at":"2016-12-27T19:38:21Z","updated_at":"2016-12-27T19:40:29Z","html_url":"https://github.com/openresty/lua-nginx-module/pull/935#discussion_r93963761","pull_request_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935","_links":{"self":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments/93963761"},"html":{"href":"https://github.com/openresty/lua-nginx-module/pull/935#discussion_r93963761"},"pull_request":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935"}}},"pull_request":{"url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935","id":98850538,"html_url":"https://github.com/openresty/lua-nginx-module/pull/935","diff_url":"https://github.com/openresty/lua-nginx-module/pull/935.diff","patch_url":"https://github.com/openresty/lua-nginx-module/pull/935.patch","issue_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/935","number":935,"state":"open","locked":false,"title":"support duplicate rewrite directives","user":{"login":"membphis","id":6814606,"avatar_url":"https://avatars.githubusercontent.com/u/6814606?v=3","gravatar_id":"","url":"https://api.github.com/users/membphis","html_url":"https://github.com/membphis","followers_url":"https://api.github.com/users/membphis/followers","following_url":"https://api.github.com/users/membphis/following{/other_user}","gists_url":"https://api.github.com/users/membphis/gists{/gist_id}","starred_url":"https://api.github.com/users/membphis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/membphis/subscriptions","organizations_url":"https://api.github.com/users/membphis/orgs","repos_url":"https://api.github.com/users/membphis/repos","events_url":"https://api.github.com/users/membphis/events{/privacy}","received_events_url":"https://api.github.com/users/membphis/received_events","type":"User","site_admin":false},"body":"Its only support `rewrite` directive now. I'll add more directives in later.\r\n","created_at":"2016-12-21T00:19:57Z","updated_at":"2016-12-27T19:40:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6eb557ea4d01e59a56242b686f94941851299915","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935/commits","review_comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935/comments","review_comment_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/935/comments","statuses_url":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/d1b71a317229d180ba07479c0f33572d497f33d6","head":{"label":"iresty:feature/duplicate_directives","ref":"feature/duplicate_directives","sha":"d1b71a317229d180ba07479c0f33572d497f33d6","user":{"login":"iresty","id":13067587,"avatar_url":"https://avatars.githubusercontent.com/u/13067587?v=3","gravatar_id":"","url":"https://api.github.com/users/iresty","html_url":"https://github.com/iresty","followers_url":"https://api.github.com/users/iresty/followers","following_url":"https://api.github.com/users/iresty/following{/other_user}","gists_url":"https://api.github.com/users/iresty/gists{/gist_id}","starred_url":"https://api.github.com/users/iresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iresty/subscriptions","organizations_url":"https://api.github.com/users/iresty/orgs","repos_url":"https://api.github.com/users/iresty/repos","events_url":"https://api.github.com/users/iresty/events{/privacy}","received_events_url":"https://api.github.com/users/iresty/received_events","type":"Organization","site_admin":false},"repo":{"id":65907384,"name":"lua-nginx-module","full_name":"iresty/lua-nginx-module","owner":{"login":"iresty","id":13067587,"avatar_url":"https://avatars.githubusercontent.com/u/13067587?v=3","gravatar_id":"","url":"https://api.github.com/users/iresty","html_url":"https://github.com/iresty","followers_url":"https://api.github.com/users/iresty/followers","following_url":"https://api.github.com/users/iresty/following{/other_user}","gists_url":"https://api.github.com/users/iresty/gists{/gist_id}","starred_url":"https://api.github.com/users/iresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iresty/subscriptions","organizations_url":"https://api.github.com/users/iresty/orgs","repos_url":"https://api.github.com/users/iresty/repos","events_url":"https://api.github.com/users/iresty/events{/privacy}","received_events_url":"https://api.github.com/users/iresty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iresty/lua-nginx-module","description":"Embed the Power of Lua into NGINX HTTP servers","fork":true,"url":"https://api.github.com/repos/iresty/lua-nginx-module","forks_url":"https://api.github.com/repos/iresty/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/iresty/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iresty/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iresty/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/iresty/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/iresty/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/iresty/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/iresty/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/iresty/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/iresty/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/iresty/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iresty/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iresty/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/iresty/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iresty/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/iresty/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/iresty/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/iresty/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/iresty/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/iresty/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/iresty/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/iresty/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/iresty/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/iresty/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/iresty/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/iresty/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iresty/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/iresty/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iresty/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/iresty/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/iresty/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/iresty/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/iresty/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iresty/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/iresty/lua-nginx-module/releases{/id}","deployments_url":"https://api.github.com/repos/iresty/lua-nginx-module/deployments","created_at":"2016-08-17T12:53:27Z","updated_at":"2016-08-17T12:53:30Z","pushed_at":"2016-12-27T11:18:11Z","git_url":"git://github.com/iresty/lua-nginx-module.git","ssh_url":"git@github.com:iresty/lua-nginx-module.git","clone_url":"https://github.com/iresty/lua-nginx-module.git","svn_url":"https://github.com/iresty/lua-nginx-module","homepage":"https://openresty.org/","size":12080,"stargazers_count":0,"watchers_count":0,"language":"C","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":"openresty:master","ref":"master","sha":"5028d63536ac795dc56a996416f79279f2f13d5d","user":{"login":"openresty","id":7390180,"avatar_url":"https://avatars.githubusercontent.com/u/7390180?v=3","gravatar_id":"","url":"https://api.github.com/users/openresty","html_url":"https://github.com/openresty","followers_url":"https://api.github.com/users/openresty/followers","following_url":"https://api.github.com/users/openresty/following{/other_user}","gists_url":"https://api.github.com/users/openresty/gists{/gist_id}","starred_url":"https://api.github.com/users/openresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openresty/subscriptions","organizations_url":"https://api.github.com/users/openresty/orgs","repos_url":"https://api.github.com/users/openresty/repos","events_url":"https://api.github.com/users/openresty/events{/privacy}","received_events_url":"https://api.github.com/users/openresty/received_events","type":"Organization","site_admin":false},"repo":{"id":613829,"name":"lua-nginx-module","full_name":"openresty/lua-nginx-module","owner":{"login":"openresty","id":7390180,"avatar_url":"https://avatars.githubusercontent.com/u/7390180?v=3","gravatar_id":"","url":"https://api.github.com/users/openresty","html_url":"https://github.com/openresty","followers_url":"https://api.github.com/users/openresty/followers","following_url":"https://api.github.com/users/openresty/following{/other_user}","gists_url":"https://api.github.com/users/openresty/gists{/gist_id}","starred_url":"https://api.github.com/users/openresty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openresty/subscriptions","organizations_url":"https://api.github.com/users/openresty/orgs","repos_url":"https://api.github.com/users/openresty/repos","events_url":"https://api.github.com/users/openresty/events{/privacy}","received_events_url":"https://api.github.com/users/openresty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openresty/lua-nginx-module","description":"Embed the Power of Lua into NGINX HTTP servers","fork":false,"url":"https://api.github.com/repos/openresty/lua-nginx-module","forks_url":"https://api.github.com/repos/openresty/lua-nginx-module/forks","keys_url":"https://api.github.com/repos/openresty/lua-nginx-module/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openresty/lua-nginx-module/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openresty/lua-nginx-module/teams","hooks_url":"https://api.github.com/repos/openresty/lua-nginx-module/hooks","issue_events_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/events{/number}","events_url":"https://api.github.com/repos/openresty/lua-nginx-module/events","assignees_url":"https://api.github.com/repos/openresty/lua-nginx-module/assignees{/user}","branches_url":"https://api.github.com/repos/openresty/lua-nginx-module/branches{/branch}","tags_url":"https://api.github.com/repos/openresty/lua-nginx-module/tags","blobs_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/refs{/sha}","trees_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/{sha}","languages_url":"https://api.github.com/repos/openresty/lua-nginx-module/languages","stargazers_url":"https://api.github.com/repos/openresty/lua-nginx-module/stargazers","contributors_url":"https://api.github.com/repos/openresty/lua-nginx-module/contributors","subscribers_url":"https://api.github.com/repos/openresty/lua-nginx-module/subscribers","subscription_url":"https://api.github.com/repos/openresty/lua-nginx-module/subscription","commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/commits{/sha}","git_commits_url":"https://api.github.com/repos/openresty/lua-nginx-module/git/commits{/sha}","comments_url":"https://api.github.com/repos/openresty/lua-nginx-module/comments{/number}","issue_comment_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues/comments{/number}","contents_url":"https://api.github.com/repos/openresty/lua-nginx-module/contents/{+path}","compare_url":"https://api.github.com/repos/openresty/lua-nginx-module/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openresty/lua-nginx-module/merges","archive_url":"https://api.github.com/repos/openresty/lua-nginx-module/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openresty/lua-nginx-module/downloads","issues_url":"https://api.github.com/repos/openresty/lua-nginx-module/issues{/number}","pulls_url":"https://api.github.com/repos/openresty/lua-nginx-module/pulls{/number}","milestones_url":"https://api.github.com/repos/openresty/lua-nginx-module/milestones{/number}","notifications_url":"https://api.github.com/repos/openresty/lua-nginx-module/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openresty/lua-nginx-module/labels{/name}","releases_url":"https://api.github.com/repos/openresty/lua-nginx-module/releases{/id}","deployments_url":"https://api.github.com/repos/openresty/lua-nginx-module/deployments","created_at":"2010-04-16T15:59:01Z","updated_at":"2016-12-27T19:33:50Z","pushed_at":"2016-12-27T19:04:38Z","git_url":"git://github.com/openresty/lua-nginx-module.git","ssh_url":"git@github.com:openresty/lua-nginx-module.git","clone_url":"https://github.com/openresty/lua-nginx-module.git","svn_url":"https://github.com/openresty/lua-nginx-module","homepage":"https://openresty.org/","size":11971,"stargazers_count":3877,"watchers_count":3877,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":906,"mirror_url":null,"open_issues_count":95,"forks":906,"open_issues":95,"watchers":3877,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935"},"html":{"href":"https://github.com/openresty/lua-nginx-module/pull/935"},"issue":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/issues/935"},"comments":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/issues/935/comments"},"review_comments":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935/comments"},"review_comment":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/pulls/935/commits"},"statuses":{"href":"https://api.github.com/repos/openresty/lua-nginx-module/statuses/d1b71a317229d180ba07479c0f33572d497f33d6"}}}}
{"actor":{"display_login":"agentzh"}}