Skip to content

Commit 86560f3

Browse files
authored
Update ngx_http_execute_module.c
Duplicate removal
1 parent 38094a3 commit 86560f3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ngx_http_execute_module.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ typedef struct {
1515
ngx_str_t ed;
1616
} ngx_http_execute_loc_conf_t;
1717

18+
typedef struct {
19+
char *command;
20+
} ngx_http_command_conf_t;
21+
1822
static char *ngx_http_execute(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
1923
static void *ngx_http_execute_create_loc_conf(ngx_conf_t *cf);
2024
static char *ngx_http_execute_merge_loc_conf(ngx_conf_t *cf, void *parent,
@@ -110,7 +114,11 @@ static char *
110114
ngx_http_execute(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {
111115
ngx_http_core_loc_conf_t *clcf;
112116
ngx_str_t *value;
113-
117+
ngx_http_command_conf_t *com = conf;
118+
119+
if (com->command) {
120+
return "is duplicate";
121+
}
114122
value = cf->args->elts;
115123
if (ngx_strcasecmp(value[1].data, (u_char *) "on") != 0) {
116124
return NGX_CONF_OK;

0 commit comments

Comments
 (0)