annotate src/http/ngx_http_variables.h @ 60:df7d3fff122b NGINX_0_1_30

nginx 0.1.30 *) Bugfix: the worker process may got caught in an endless loop if the SSI was used. *) Bugfix: the response encrypted by SSL may not transferred complete. *) Bugfix: if the length of the response part received at once from proxied or FastCGI server was equal to 500, then nginx returns the 500 response code; in proxy mode the bug appeared in 0.1.29 only. *) Bugfix: nginx did not consider the directives with 8 or 9 parameters as invalid. *) Feature: the "return" directive can return the 204 response code. *) Feature: the "ignore_invalid_headers" directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 14 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_ */