Mercurial > hg > nginx
comparison src/http/modules/ngx_http_uwsgi_module.c @ 3553:b4a60663f6c0
delete unused ngx_http_uwsgi_add_variables()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Jun 2010 20:21:56 +0000 |
parents | 40eba0271b1d |
children | 36b3c1b21544 |
comparison
equal
deleted
inserted
replaced
3552:40eba0271b1d | 3553:b4a60663f6c0 |
---|---|
50 static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r); | 50 static ngx_int_t ngx_http_uwsgi_process_header(ngx_http_request_t *r); |
51 static void ngx_http_uwsgi_abort_request(ngx_http_request_t *r); | 51 static void ngx_http_uwsgi_abort_request(ngx_http_request_t *r); |
52 static void ngx_http_uwsgi_finalize_request(ngx_http_request_t *r, | 52 static void ngx_http_uwsgi_finalize_request(ngx_http_request_t *r, |
53 ngx_int_t rc); | 53 ngx_int_t rc); |
54 | 54 |
55 static ngx_int_t ngx_http_uwsgi_add_variables(ngx_conf_t *cf); | |
56 static void *ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf); | 55 static void *ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf); |
57 static char *ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, | 56 static char *ngx_http_uwsgi_merge_loc_conf(ngx_conf_t *cf, void *parent, |
58 void *child); | 57 void *child); |
59 | 58 |
60 static char *ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, | 59 static char *ngx_http_uwsgi_pass(ngx_conf_t *cf, ngx_command_t *cmd, |
250 ngx_null_command | 249 ngx_null_command |
251 }; | 250 }; |
252 | 251 |
253 | 252 |
254 static ngx_http_module_t ngx_http_uwsgi_module_ctx = { | 253 static ngx_http_module_t ngx_http_uwsgi_module_ctx = { |
255 ngx_http_uwsgi_add_variables, /* preconfiguration */ | 254 NULL, /* preconfiguration */ |
256 NULL, /* postconfiguration */ | 255 NULL, /* postconfiguration */ |
257 | 256 |
258 NULL, /* create main configuration */ | 257 NULL, /* create main configuration */ |
259 NULL, /* init main configuration */ | 258 NULL, /* init main configuration */ |
260 | 259 |
277 NULL, /* init thread */ | 276 NULL, /* init thread */ |
278 NULL, /* exit thread */ | 277 NULL, /* exit thread */ |
279 NULL, /* exit process */ | 278 NULL, /* exit process */ |
280 NULL, /* exit master */ | 279 NULL, /* exit master */ |
281 NGX_MODULE_V1_PADDING | 280 NGX_MODULE_V1_PADDING |
282 }; | |
283 | |
284 | |
285 static ngx_http_variable_t ngx_http_uwsgi_vars[] = { | |
286 | |
287 { ngx_null_string, NULL, NULL, 0, 0, 0 } | |
288 }; | 281 }; |
289 | 282 |
290 | 283 |
291 static ngx_str_t ngx_http_uwsgi_hide_headers[] = { | 284 static ngx_str_t ngx_http_uwsgi_hide_headers[] = { |
292 ngx_string("Status"), | 285 ngx_string("Status"), |
1061 | 1054 |
1062 return; | 1055 return; |
1063 } | 1056 } |
1064 | 1057 |
1065 | 1058 |
1066 static ngx_int_t | |
1067 ngx_http_uwsgi_add_variables(ngx_conf_t *cf) | |
1068 { | |
1069 ngx_http_variable_t *var, *v; | |
1070 | |
1071 for (v = ngx_http_uwsgi_vars; v->name.len; v++) { | |
1072 var = ngx_http_add_variable(cf, &v->name, v->flags); | |
1073 if (var == NULL) { | |
1074 return NGX_ERROR; | |
1075 } | |
1076 | |
1077 var->get_handler = v->get_handler; | |
1078 var->data = v->data; | |
1079 } | |
1080 | |
1081 return NGX_OK; | |
1082 } | |
1083 | |
1084 | |
1085 static void * | 1059 static void * |
1086 ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf) | 1060 ngx_http_uwsgi_create_loc_conf(ngx_conf_t *cf) |
1087 { | 1061 { |
1088 ngx_http_uwsgi_loc_conf_t *conf; | 1062 ngx_http_uwsgi_loc_conf_t *conf; |
1089 | 1063 |