15
15
#define form_urlencoded_type_len (sizeof(form_urlencoded_type) - 1)
16
16
17
17
18
- #if 0
19
-
20
- typedef struct {
21
- ngx_flag_t enabled ;
22
- } ngx_http_form_input_loc_conf_t ;
23
-
24
- #endif
25
-
26
-
27
18
typedef struct {
28
19
unsigned used ; /* :1 */
29
20
} ngx_http_form_input_main_conf_t ;
@@ -40,16 +31,6 @@ static ngx_int_t ngx_http_set_form_input(ngx_http_request_t *r, ngx_str_t *res,
40
31
static char * ngx_http_set_form_input_conf_handler (ngx_conf_t * cf ,
41
32
ngx_command_t * cmd , void * conf );
42
33
static void * ngx_http_form_input_create_main_conf (ngx_conf_t * cf );
43
-
44
-
45
- #if 0
46
-
47
- static void * ngx_http_form_input_create_loc_conf (ngx_conf_t * cf );
48
- static char * ngx_http_form_input_merge_loc_conf (ngx_conf_t * cf , void * parent ,
49
- void * child );
50
-
51
- #endif
52
-
53
34
static ngx_int_t ngx_http_form_input_init (ngx_conf_t * cf );
54
35
static ngx_int_t ngx_http_form_input_handler (ngx_http_request_t * r );
55
36
static void ngx_http_form_input_post_read (ngx_http_request_t * r );
@@ -88,7 +69,7 @@ static ngx_http_module_t ngx_http_form_input_module_ctx = {
88
69
NULL , /* merge server configuration */
89
70
90
71
NULL , /* create location configuration */
91
- NULL /* merge location configuration */
72
+ NULL /* merge location configuration */
92
73
};
93
74
94
75
@@ -371,32 +352,6 @@ ngx_http_set_form_input_conf_handler(ngx_conf_t *cf, ngx_command_t *cmd,
371
352
}
372
353
373
354
374
- #if 0
375
-
376
- static void *
377
- ngx_http_form_input_create_loc_conf (ngx_conf_t * cf )
378
- {
379
- ngx_http_form_input_loc_conf_t * conf ;
380
-
381
- conf = ngx_palloc (cf -> pool , sizeof (ngx_http_form_input_loc_conf_t ));
382
-
383
- if (conf == NULL ) {
384
- return NULL ;
385
- }
386
-
387
- return conf ;
388
- }
389
-
390
-
391
- static char *
392
- ngx_http_form_input_merge_loc_conf (ngx_conf_t * cf , void * parent , void * child )
393
- {
394
- return NGX_CONF_OK ;
395
- }
396
-
397
- #endif
398
-
399
-
400
355
/* register a new rewrite phase handler */
401
356
static ngx_int_t
402
357
ngx_http_form_input_init (ngx_conf_t * cf )
@@ -406,16 +361,6 @@ ngx_http_form_input_init(ngx_conf_t *cf)
406
361
ngx_http_core_main_conf_t * cmcf ;
407
362
ngx_http_form_input_main_conf_t * fmcf ;
408
363
409
- /*
410
- ngx_http_form_input_loc_conf_t *lcf;
411
-
412
- lcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_form_input_module);
413
- if (lcf->enabled != 1) {
414
- dd("set_form_input not used");
415
- return NGX_OK;
416
- }
417
- */
418
-
419
364
fmcf = ngx_http_conf_get_module_main_conf (cf , ngx_http_form_input_module );
420
365
421
366
if (!fmcf -> used ) {
0 commit comments