annotate src/http/ngx_http_variables.h @ 66:818201e5a553 NGINX_0_1_33

nginx 0.1.33 *) Bugfix: nginx could not be built with the --without-pcre parameter; bug appeared in 0.1.29. *) Bugfix: 3, 4, 7, and 8 the "proxy_set_header" directives in one level cause the bus fault on start up. *) Bugfix: the HTTP protocol was specified in the HTTPS redirects. *) Bugfix: if the "rewrite" directive used the captures inside the "if" directive, then the 500 error code was returned.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 May 2005 00:00:00 +0400
parents b55cbf18157e
children 056fd0e5a5a6
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
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 {
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
36 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
37 ngx_http_get_variable_pt handler;
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
38 uintptr_t data;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
39 ngx_uint_t flags;
48
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 };
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
50
72eb30262aac nginx 0.1.25
Igor Sysoev <http://sysoev.ru>
parents: 48
diff changeset
43 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
44 ngx_uint_t flags);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
45 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
46 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
47 ngx_uint_t index);
6cfc63e68377 nginx 0.1.24
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 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
49 ngx_str_t *name);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
50
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 50
diff changeset
51 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
52 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
53
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 #endif /* _NGX_HTTP_VARIABLES_H_INCLUDED_ */