Mercurial > hg > nginx
annotate src/http/modules/ngx_http_stub_status_module.c @ 6982:ac9b1df5b246
SSL: disabled renegotiation detection in client mode.
CVE-2009-3555 is no longer relevant and mitigated by the renegotiation
info extension (secure renegotiation). On the other hand, unexpected
renegotiation still introduces potential security risks, and hence we do
not allow renegotiation on the server side, as we never request renegotiation.
On the client side the situation is different though. There are backends
which explicitly request renegotiation, and disabled renegotiation
introduces interoperability problems. This change allows renegotiation
on the client side, and fixes interoperability problems as observed with
such backends (ticket #872).
Additionally, with TLSv1.3 the SSL_CB_HANDSHAKE_START flag is currently set
by OpenSSL when receiving a NewSessionTicket message, and was detected by
nginx as a renegotiation attempt. This looks like a bug in OpenSSL, though
this change also allows better interoperability till the problem is fixed.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 18 Apr 2017 16:08:44 +0300 |
parents | b1858fc47e3b |
children | 2a288909abc6 |
rev | line source |
---|---|
577 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4412 | 4 * Copyright (C) Nginx, Inc. |
577 | 5 */ |
6 | |
487 | 7 |
8 #include <ngx_config.h> | |
9 #include <ngx_core.h> | |
10 #include <ngx_http.h> | |
11 | |
12 | |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
13 static ngx_int_t ngx_http_stub_status_handler(ngx_http_request_t *r); |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
14 static ngx_int_t ngx_http_stub_status_variable(ngx_http_request_t *r, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
15 ngx_http_variable_value_t *v, uintptr_t data); |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
16 static ngx_int_t ngx_http_stub_status_add_variables(ngx_conf_t *cf); |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
17 static char *ngx_http_set_stub_status(ngx_conf_t *cf, ngx_command_t *cmd, |
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
18 void *conf); |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
19 |
577 | 20 |
487 | 21 static ngx_command_t ngx_http_status_commands[] = { |
22 | |
23 { ngx_string("stub_status"), | |
5811
f5b612019042
Stub status: corrected the "stub_status" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
5783
diff
changeset
|
24 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_NOARGS|NGX_CONF_TAKE1, |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
25 ngx_http_set_stub_status, |
487 | 26 0, |
27 0, | |
28 NULL }, | |
29 | |
30 ngx_null_command | |
577 | 31 }; |
487 | 32 |
33 | |
667 | 34 static ngx_http_module_t ngx_http_stub_status_module_ctx = { |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
35 ngx_http_stub_status_add_variables, /* preconfiguration */ |
509 | 36 NULL, /* postconfiguration */ |
487 | 37 |
38 NULL, /* create main configuration */ | |
39 NULL, /* init main configuration */ | |
577 | 40 |
487 | 41 NULL, /* create server configuration */ |
42 NULL, /* merge server configuration */ | |
577 | 43 |
487 | 44 NULL, /* create location configuration */ |
45 NULL /* merge location configuration */ | |
46 }; | |
47 | |
48 | |
49 ngx_module_t ngx_http_stub_status_module = { | |
509 | 50 NGX_MODULE_V1, |
487 | 51 &ngx_http_stub_status_module_ctx, /* module context */ |
52 ngx_http_status_commands, /* module directives */ | |
53 NGX_HTTP_MODULE, /* module type */ | |
541 | 54 NULL, /* init master */ |
487 | 55 NULL, /* init module */ |
541 | 56 NULL, /* init process */ |
57 NULL, /* init thread */ | |
58 NULL, /* exit thread */ | |
59 NULL, /* exit process */ | |
60 NULL, /* exit master */ | |
61 NGX_MODULE_V1_PADDING | |
487 | 62 }; |
63 | |
64 | |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
65 static ngx_http_variable_t ngx_http_stub_status_vars[] = { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
66 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
67 { ngx_string("connections_active"), NULL, ngx_http_stub_status_variable, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
68 0, NGX_HTTP_VAR_NOCACHEABLE, 0 }, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
69 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
70 { ngx_string("connections_reading"), NULL, ngx_http_stub_status_variable, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
71 1, NGX_HTTP_VAR_NOCACHEABLE, 0 }, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
72 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
73 { ngx_string("connections_writing"), NULL, ngx_http_stub_status_variable, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
74 2, NGX_HTTP_VAR_NOCACHEABLE, 0 }, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
75 |
5115
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
76 { ngx_string("connections_waiting"), NULL, ngx_http_stub_status_variable, |
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
77 3, NGX_HTTP_VAR_NOCACHEABLE, 0 }, |
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
78 |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
79 { ngx_null_string, NULL, NULL, 0, 0, 0 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
80 }; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
81 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
82 |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
83 static ngx_int_t |
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
84 ngx_http_stub_status_handler(ngx_http_request_t *r) |
487 | 85 { |
495 | 86 size_t size; |
87 ngx_int_t rc; | |
88 ngx_buf_t *b; | |
89 ngx_chain_t out; | |
5115
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
90 ngx_atomic_int_t ap, hn, ac, rq, rd, wr, wa; |
577 | 91 |
6306
b1858fc47e3b
Style: unified request method checks.
Ruslan Ermilov <ru@nginx.com>
parents:
5811
diff
changeset
|
92 if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) { |
487 | 93 return NGX_HTTP_NOT_ALLOWED; |
94 } | |
95 | |
1370
cc114c85be0f
rename ngx_http_discard_body() to ngx_http_discard_request_body()
Igor Sysoev <igor@sysoev.ru>
parents:
667
diff
changeset
|
96 rc = ngx_http_discard_request_body(r); |
487 | 97 |
1374 | 98 if (rc != NGX_OK) { |
487 | 99 return rc; |
100 } | |
101 | |
5497
2cfc095a607a
Fixed setting of content type in some cases.
Ruslan Ermilov <ru@nginx.com>
parents:
5243
diff
changeset
|
102 r->headers_out.content_type_len = sizeof("text/plain") - 1; |
3516
dd1570b6f237
ngx_str_set() and ngx_str_null()
Igor Sysoev <igor@sysoev.ru>
parents:
1563
diff
changeset
|
103 ngx_str_set(&r->headers_out.content_type, "text/plain"); |
5497
2cfc095a607a
Fixed setting of content type in some cases.
Ruslan Ermilov <ru@nginx.com>
parents:
5243
diff
changeset
|
104 r->headers_out.content_type_lowcase = NULL; |
487 | 105 |
106 if (r->method == NGX_HTTP_HEAD) { | |
107 r->headers_out.status = NGX_HTTP_OK; | |
108 | |
109 rc = ngx_http_send_header(r); | |
110 | |
111 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | |
112 return rc; | |
113 } | |
114 } | |
115 | |
495 | 116 size = sizeof("Active connections: \n") + NGX_ATOMIC_T_LEN |
487 | 117 + sizeof("server accepts handled requests\n") - 1 |
495 | 118 + 6 + 3 * NGX_ATOMIC_T_LEN |
119 + sizeof("Reading: Writing: Waiting: \n") + 3 * NGX_ATOMIC_T_LEN; | |
487 | 120 |
501 | 121 b = ngx_create_temp_buf(r->pool, size); |
122 if (b == NULL) { | |
487 | 123 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
124 } | |
125 | |
126 out.buf = b; | |
127 out.next = NULL; | |
128 | |
129 ap = *ngx_stat_accepted; | |
495 | 130 hn = *ngx_stat_handled; |
487 | 131 ac = *ngx_stat_active; |
132 rq = *ngx_stat_requests; | |
133 rd = *ngx_stat_reading; | |
134 wr = *ngx_stat_writing; | |
5115
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
135 wa = *ngx_stat_waiting; |
487 | 136 |
509 | 137 b->last = ngx_sprintf(b->last, "Active connections: %uA \n", ac); |
487 | 138 |
139 b->last = ngx_cpymem(b->last, "server accepts handled requests\n", | |
140 sizeof("server accepts handled requests\n") - 1); | |
141 | |
509 | 142 b->last = ngx_sprintf(b->last, " %uA %uA %uA \n", ap, hn, rq); |
487 | 143 |
509 | 144 b->last = ngx_sprintf(b->last, "Reading: %uA Writing: %uA Waiting: %uA \n", |
5115
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
145 rd, wr, wa); |
487 | 146 |
147 r->headers_out.status = NGX_HTTP_OK; | |
148 r->headers_out.content_length_n = b->last - b->pos; | |
149 | |
4611
2b6cb7528409
Allows particular modules to handle subrequests properly.
Andrey Belov <defan@nginx.com>
parents:
4412
diff
changeset
|
150 b->last_buf = (r == r->main) ? 1 : 0; |
5243
ee739104d164
Status: the "last_in_chain" flag must be set.
Valentin Bartenev <vbart@nginx.com>
parents:
5115
diff
changeset
|
151 b->last_in_chain = 1; |
487 | 152 |
153 rc = ngx_http_send_header(r); | |
154 | |
155 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | |
156 return rc; | |
157 } | |
158 | |
1563
022ec9420f80
style fix: remove double semicolons
Igor Sysoev <igor@sysoev.ru>
parents:
1374
diff
changeset
|
159 return ngx_http_output_filter(r, &out); |
487 | 160 } |
161 | |
162 | |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
163 static ngx_int_t |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
164 ngx_http_stub_status_variable(ngx_http_request_t *r, |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
165 ngx_http_variable_value_t *v, uintptr_t data) |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
166 { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
167 u_char *p; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
168 ngx_atomic_int_t value; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
169 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
170 p = ngx_pnalloc(r->pool, NGX_ATOMIC_T_LEN); |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
171 if (p == NULL) { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
172 return NGX_ERROR; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
173 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
174 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
175 switch (data) { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
176 case 0: |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
177 value = *ngx_stat_active; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
178 break; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
179 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
180 case 1: |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
181 value = *ngx_stat_reading; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
182 break; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
183 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
184 case 2: |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
185 value = *ngx_stat_writing; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
186 break; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
187 |
5115
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
188 case 3: |
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
189 value = *ngx_stat_waiting; |
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
190 break; |
a29c574d61fa
Status: introduced the "ngx_stat_waiting" counter.
Valentin Bartenev <vbart@nginx.com>
parents:
5079
diff
changeset
|
191 |
5079
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
192 /* suppress warning */ |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
193 default: |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
194 value = 0; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
195 break; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
196 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
197 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
198 v->len = ngx_sprintf(p, "%uA", value) - p; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
199 v->valid = 1; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
200 v->no_cacheable = 0; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
201 v->not_found = 0; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
202 v->data = p; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
203 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
204 return NGX_OK; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
205 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
206 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
207 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
208 static ngx_int_t |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
209 ngx_http_stub_status_add_variables(ngx_conf_t *cf) |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
210 { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
211 ngx_http_variable_t *var, *v; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
212 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
213 for (v = ngx_http_stub_status_vars; v->name.len; v++) { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
214 var = ngx_http_add_variable(cf, &v->name, v->flags); |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
215 if (var == NULL) { |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
216 return NGX_ERROR; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
217 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
218 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
219 var->get_handler = v->get_handler; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
220 var->data = v->data; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
221 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
222 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
223 return NGX_OK; |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
224 } |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
225 |
1c472e3b8c10
Introduced variables in ngx_http_stub_status module.
Andrey Belov <defan@nginx.com>
parents:
4611
diff
changeset
|
226 |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
227 static char * |
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
228 ngx_http_set_stub_status(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
487 | 229 { |
230 ngx_http_core_loc_conf_t *clcf; | |
231 | |
232 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); | |
5783
dc7c139fca21
Status: indentation and style, no functional changes.
Sergey Kandaurov <pluknet@nginx.com>
parents:
5497
diff
changeset
|
233 clcf->handler = ngx_http_stub_status_handler; |
487 | 234 |
235 return NGX_CONF_OK; | |
236 } |