annotate src/http/ngx_http_variables.h @ 376:d13234035cad NGINX_0_6_32

nginx 0.6.32 *) Change: the "none" parameter in the "ssl_session_cache" directive; now this is default parameter. Thanks to Rob Mueller. *) Change: now the 0x00-0x1F, '"' and '\' characters are escaped as \xXX in an access_log. Thanks to Maxim Dounin. *) Change: now nginx allows several "Host" request header line. *) Feature: the "modified" flag in the "expires" directive. *) Feature: the $uid_got and $uid_set variables may be used at any request processing stage. *) Feature: the $hostname variable. Thanks to Andrei Nigmatulin. *) Feature: DESTDIR support. Thanks to Todd A. Fisher and Andras Voroskoi. *) Bugfix: if sub_filter and SSI were used together, then responses might were transferred incorrectly. *) Bugfix: large SSI inclusions might be truncated. *) Bugfix: the "proxy_pass" directive did not work with the HTTPS protocol; the bug had appeared in 0.6.9. *) Bugfix: worker processes might not catch reconfiguration and log rotation signals. *) Bugfix: nginx could not be built on latest Fedora 9 Linux. Thanks to Roxis. *) Bugfix: a segmentation fault might occur in worker process on Linux, if keepalive was enabled.
author Igor Sysoev <http://sysoev.ru>
date Mon, 07 Jul 2008 00:00:00 +0400
parents 10cc350ed8a1
children
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
320
95183808f549 nginx 0.6.4
Igor Sysoev <http://sysoev.ru>
parents: 296
diff changeset
17 typedef ngx_variable_value_t ngx_http_variable_value_t;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18
376
d13234035cad nginx 0.6.32
Igor Sysoev <http://sysoev.ru>
parents: 340
diff changeset
19 #define ngx_http_variable(v) { sizeof(v) - 1, 1, 0, 0, 0, (u_char *) v }
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
20
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21 typedef struct ngx_http_variable_s ngx_http_variable_t;
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22
186
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 184
diff changeset
23 typedef void (*ngx_http_set_variable_pt) (ngx_http_request_t *r,
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 184
diff changeset
24 ngx_http_variable_value_t *v, uintptr_t data);
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
25 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
26 ngx_http_variable_value_t *v, uintptr_t data);
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 320
diff changeset
29 #define NGX_HTTP_VAR_CHANGEABLE 1
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 320
diff changeset
30 #define NGX_HTTP_VAR_NOCACHEABLE 2
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 320
diff changeset
31 #define NGX_HTTP_VAR_INDEXED 4
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 320
diff changeset
32 #define NGX_HTTP_VAR_NOHASH 8
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
33
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
34
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35 struct ngx_http_variable_s {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
36 ngx_str_t name; /* must be first to build the hash */
186
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 184
diff changeset
37 ngx_http_set_variable_pt set_handler;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 184
diff changeset
38 ngx_http_get_variable_pt get_handler;
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
39 uintptr_t data;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
40 ngx_uint_t flags;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
41 ngx_uint_t index;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 };
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
45 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
46 ngx_uint_t flags);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
47 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
48 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
49 ngx_uint_t index);
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
50 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
51 ngx_uint_t index);
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 82
diff changeset
52
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 ngx_http_variable_value_t *ngx_http_get_variable(ngx_http_request_t *r,
184
71ff1e2b484a nginx 0.3.39
Igor Sysoev <http://sysoev.ru>
parents: 160
diff changeset
54 ngx_str_t *name, ngx_uint_t key, ngx_uint_t nowarn);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
55
296
2ceaee987f37 nginx 0.5.18
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
56 ngx_int_t ngx_http_variable_unknown_header(ngx_http_variable_value_t *v,
2ceaee987f37 nginx 0.5.18
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
57 ngx_str_t *var, ngx_list_part_t *part, size_t prefix);
2ceaee987f37 nginx 0.5.18
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
58
2ceaee987f37 nginx 0.5.18
Igor Sysoev <http://sysoev.ru>
parents: 186
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_ */