@@ -76,7 +76,7 @@ static ngx_command_t ngx_http_array_var_commands[] = {
76
76
ngx_http_array_map_op ,
77
77
0 ,
78
78
0 ,
79
- ngx_http_array_var_map_op
79
+ ( void * ) ngx_http_array_var_map_op
80
80
},
81
81
{
82
82
ngx_string ("array_join" ),
@@ -85,7 +85,7 @@ static ngx_command_t ngx_http_array_var_commands[] = {
85
85
ngx_http_array_join ,
86
86
0 ,
87
87
0 ,
88
- ngx_http_array_var_join
88
+ ( void * ) ngx_http_array_var_join
89
89
},
90
90
91
91
ngx_null_command
@@ -138,7 +138,7 @@ ngx_http_array_split(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
138
138
}
139
139
140
140
filter .type = NDK_SET_VAR_MULTI_VALUE_DATA ;
141
- filter .func = ngx_http_array_var_split ;
141
+ filter .func = ( void * ) ngx_http_array_var_split ;
142
142
filter .data = data ;
143
143
144
144
value = cf -> args -> elts ;
@@ -255,7 +255,7 @@ ngx_http_array_map(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
255
255
}
256
256
257
257
filter .type = NDK_SET_VAR_VALUE_DATA ;
258
- filter .func = ngx_http_array_var_map ;
258
+ filter .func = ( void * ) ngx_http_array_var_map ;
259
259
filter .data = data ;
260
260
filter .size = 1 ;
261
261
@@ -309,7 +309,7 @@ ngx_http_array_map_op(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
309
309
}
310
310
311
311
filter .type = NDK_SET_VAR_MULTI_VALUE_DATA ;
312
- filter .func = ( ndk_set_var_value_pt ) cmd -> post ;
312
+ filter .func = cmd -> post ;
313
313
filter .data = data ;
314
314
315
315
value = cf -> args -> elts ;
@@ -368,7 +368,7 @@ ngx_http_array_join(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
368
368
ngx_str_t * bad_arg ;
369
369
370
370
filter .type = NDK_SET_VAR_MULTI_VALUE ;
371
- filter .func = ( ndk_set_var_value_pt ) cmd -> post ;
371
+ filter .func = cmd -> post ;
372
372
373
373
value = cf -> args -> elts ;
374
374
@@ -476,9 +476,13 @@ ngx_http_array_var_split(ngx_http_request_t *r,
476
476
goto done ;
477
477
}
478
478
479
- while (i != max - 1 && (last = ngx_http_array_var_strlstrn (pos , end ,
480
- sep -> data , sep -> len - 1 )))
481
- {
479
+ while (i != max - 1 ) {
480
+ last = ngx_http_array_var_strlstrn (pos , end , sep -> data ,
481
+ sep -> len - 1 );
482
+ if (last == NULL ) {
483
+ break ;
484
+ }
485
+
482
486
s = ngx_array_push (array );
483
487
if (s == NULL ) {
484
488
return NGX_ERROR ;
0 commit comments