annotate src/http/ngx_http_variables.h @ 126:df17fbafec8f NGINX_0_3_10

nginx 0.3.10 *) Change: the "valid_referers" directive and the "$invalid_referer" variable were moved to the new ngx_http_referer_module from the ngx_http_rewrite_module. *) Change: the "$apache_bytes_sent" variable name was changed to "$body_bytes_sent". *) Feature: the "$sent_http_..." variables. *) Feature: the "if" directive supports the "=" and "!=" operations. *) Feature: the "proxy_pass" directive supports the HTTPS protocol. *) Feature: the "proxy_set_body" directive. *) Feature: the "post_action" directive. *) Feature: the ngx_http_empty_gif_module. *) Feature: the "worker_cpu_affinity" directive for Linux. *) Bugfix: the "rewrite" directive did not unescape URI part in redirect, now it is unescaped except the %00-%25 and %7F-%FF characters. *) Bugfix: nginx could not be built by the icc 9.0 compiler. *) Bugfix: if the SSI was enabled for zero size static file, then the chunked response was encoded incorrectly.
author Igor Sysoev <http://sysoev.ru>
date Tue, 15 Nov 2005 00:00:00 +0300
parents d25a1d6034f1
children 91372f004adf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_HTTP_VARIABLES_H_INCLUDED_
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_HTTP_VARIABLES_H_INCLUDED_
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_event.h>
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14 #include <ngx_http.h>
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
17 typedef struct {
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
18 unsigned len:29;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
20 unsigned valid:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
21 unsigned no_cachable:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
22 unsigned not_found:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
23
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
24 u_char *data;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
25 } ngx_http_variable_value_t;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
27 #define ngx_http_variable(v) { sizeof(v) - 1, 1, 0, 0, (u_char *) v }
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
28
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29 typedef struct ngx_http_variable_s ngx_http_variable_t;
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
31 typedef ngx_int_t (*ngx_http_get_variable_pt) (ngx_http_request_t *r,
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
32 ngx_http_variable_value_t *v, uintptr_t data);
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
35 #define NGX_HTTP_VAR_CHANGABLE 1
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
36 #define NGX_HTTP_VAR_NOCACHABLE 2
68
056fd0e5a5a6 nginx 0.1.34
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
37 #define NGX_HTTP_VAR_INDEXED 4
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
38
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
39
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 struct ngx_http_variable_s {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
41 ngx_str_t name; /* must be first to build the hash */
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
42 ngx_http_get_variable_pt handler;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
43 uintptr_t data;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
44 ngx_uint_t flags;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
45 ngx_uint_t index;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46 };
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
49 ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
50 ngx_uint_t flags);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
51 ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
52 ngx_http_variable_value_t *ngx_http_get_indexed_variable(ngx_http_request_t *r,
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 ngx_uint_t index);
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
54 ngx_http_variable_value_t *ngx_http_get_flushed_variable(ngx_http_request_t *r,
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
55 ngx_uint_t index);
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
56
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
57 ngx_http_variable_value_t *ngx_http_get_variable(ngx_http_request_t *r,
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
58 ngx_str_t *name);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
59
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
60 #define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
61
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
62
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
63 ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
64 ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
65
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66
126
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
67 extern ngx_http_variable_value_t ngx_http_variable_null_value;
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
68 extern ngx_http_variable_value_t ngx_http_variable_true_value;
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
69
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
70
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71 #endif /* _NGX_HTTP_VARIABLES_H_INCLUDED_ */