annotate src/http/ngx_http_variables.h @ 68:056fd0e5a5a6 NGINX_0_1_34

nginx 0.1.34 *) Bugfix: the worker process may got caught in an endless loop if the big response part were include by SSI. *) Bugfix: the variables set by the "set" directive were not available in SSI. *) Feature: the "autoindex_localtime" directive. *) Bugfix: the empty value of the "proxy_set_header" directive forbids the client request header line passing.
author Igor Sysoev <http://sysoev.ru>
date Thu, 26 May 2005 00:00:00 +0400
parents b55cbf18157e
children 2aa14f638cf0
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
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
17 #define NGX_HTTP_VAR_NOT_FOUND (ngx_http_variable_value_t *) -1
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
20 typedef struct {
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21 ngx_uint_t value;
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22 ngx_str_t text;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
23 } ngx_http_variable_value_t;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25 typedef struct ngx_http_variable_s ngx_http_variable_t;
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27 typedef ngx_http_variable_value_t *
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
28 (*ngx_http_get_variable_pt) (ngx_http_request_t *r, uintptr_t data);
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
31 #define NGX_HTTP_VAR_CHANGABLE 1
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
32 #define NGX_HTTP_VAR_NOCACHABLE 2
68
056fd0e5a5a6 nginx 0.1.34
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
33 #define NGX_HTTP_VAR_INDEXED 4
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
34
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
35
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36 struct ngx_http_variable_s {
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
37 ngx_str_t name; /* must be first to build the hash */
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
38 ngx_http_get_variable_pt handler;
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
39 uintptr_t data;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
40 ngx_uint_t flags;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41 };
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
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
44 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
45 ngx_uint_t flags);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
46 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
47 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
48 ngx_uint_t index);
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
49 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
50 ngx_str_t *name);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
51
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
52 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
53 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
54
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
55
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
56 #endif /* _NGX_HTTP_VARIABLES_H_INCLUDED_ */