Mercurial > hg > nginx-vendor-current
annotate src/core/ngx_buf.h @ 58:b55cbf18157e NGINX_0_1_29
nginx 0.1.29
*) Feature: the ngx_http_ssi_module supports "include virtual" command.
*) Feature: the ngx_http_ssi_module supports the condition command like
'if expr="$NAME"' and "else" and "endif" commands. Only one nested
level is supported.
*) Feature: the ngx_http_ssi_module supports the DATE_LOCAL and
DATE_GMT variables and "config timefmt" command.
*) Feature: the "ssi_ignore_recycled_buffers" directive.
*) Bugfix: the "echo" command did not show the default value for the
empty QUERY_STRING variable.
*) Change: the ngx_http_proxy_module was rewritten.
*) Feature: the "proxy_redirect", "proxy_pass_request_headers",
"proxy_pass_request_body", and "proxy_method" directives.
*) Feature: the "proxy_set_header" directive. The "proxy_x_var" was
canceled and must be replaced with the proxy_set_header directive.
*) Change: the "proxy_preserve_host" is canceled and must be replaced
with the "proxy_set_header Host $host" and the "proxy_redirect off"
directives, the "proxy_set_header Host $host:$proxy_port" directive
and the appropriate proxy_redirect directives.
*) Change: the "proxy_set_x_real_ip" is canceled and must be replaced
with the "proxy_set_header X-Real-IP $remote_addr" directive.
*) Change: the "proxy_add_x_forwarded_for" is canceled and must be
replaced with
the "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for"
directive.
*) Change: the "proxy_set_x_url" is canceled and must be replaced with
the "proxy_set_header X-URL http://$host:$server_port$request_uri"
directive.
*) Feature: the "fastcgi_param" directive.
*) Change: the "fastcgi_root", "fastcgi_set_var" and "fastcgi_params"
directive are canceled and must be replaced with the fastcgi_param
directives.
*) Feature: the "index" directive can use the variables.
*) Feature: the "index" directive can be used at http and server levels.
*) Change: the last index only in the "index" directive can be absolute.
*) Feature: the "rewrite" directive can use the variables.
*) Feature: the "internal" directive.
*) Feature: the CONTENT_LENGTH, CONTENT_TYPE, REMOTE_PORT, SERVER_ADDR,
SERVER_PORT, SERVER_PROTOCOL, DOCUMENT_ROOT, SERVER_NAME,
REQUEST_METHOD, REQUEST_URI, and REMOTE_USER variables.
*) Change: nginx now passes the invalid lines in a client request
headers or a backend response header.
*) Bugfix: if the backend did not transfer response for a long time and
the "send_timeout" was less than "proxy_read_timeout", then nginx
returned the 408 response.
*) Bugfix: the segmentation fault was occurred if the backend sent an
invalid line in response header; bug appeared in 0.1.26.
*) Bugfix: the segmentation fault may occurred in FastCGI fault
tolerance configuration.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" and "Cache-Control" headers.
*) Bugfix: nginx did not take into account trailing dot in "Host"
header line.
*) Bugfix: the ngx_http_auth_module did not work under Linux.
*) Bugfix: the rewrite directive worked incorrectly, if the arguments
were in a request.
*) Bugfix: nginx could not be built on MacOS X.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 12 May 2005 00:00:00 +0400 |
parents | 3050baa54a26 |
children | 82d695e3d662 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_BUF_H_INCLUDED_ | |
8 #define _NGX_BUF_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 | |
14 | |
15 typedef void * ngx_buf_tag_t; | |
16 | |
17 typedef struct ngx_buf_s ngx_buf_t; | |
18 | |
19 struct ngx_buf_s { | |
20 u_char *pos; | |
21 u_char *last; | |
22 off_t file_pos; | |
23 off_t file_last; | |
24 | |
25 u_char *start; /* start of buffer */ | |
26 u_char *end; /* end of buffer */ | |
27 ngx_buf_tag_t tag; | |
28 ngx_file_t *file; | |
29 ngx_buf_t *shadow; | |
30 | |
31 | |
32 /* the buf's content could be changed */ | |
33 unsigned temporary:1; | |
34 | |
35 /* | |
36 * the buf's content is in a memory cache or in a read only memory | |
37 * and must not be changed | |
38 */ | |
39 unsigned memory:1; | |
40 | |
41 /* the buf's content is mmap()ed and must not be changed */ | |
42 unsigned mmap:1; | |
43 | |
44 unsigned recycled:1; | |
45 unsigned in_file:1; | |
46 unsigned flush:1; | |
58 | 47 unsigned sync:1; |
0 | 48 unsigned last_buf:1; |
58 | 49 unsigned last_in_chain:1; |
0 | 50 |
51 unsigned last_shadow:1; | |
52 unsigned temp_file:1; | |
53 | |
54 unsigned zerocopy_busy:1; | |
55 | |
56 /* STUB */ int num; | |
57 }; | |
58 | |
59 | |
60 struct ngx_chain_s { | |
61 ngx_buf_t *buf; | |
62 ngx_chain_t *next; | |
63 }; | |
64 | |
65 | |
66 typedef struct { | |
67 ngx_int_t num; | |
68 size_t size; | |
69 } ngx_bufs_t; | |
70 | |
71 | |
28 | 72 typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in); |
0 | 73 |
74 typedef struct { | |
75 ngx_buf_t *buf; | |
76 ngx_chain_t *in; | |
77 ngx_chain_t *free; | |
78 ngx_chain_t *busy; | |
79 | |
80 unsigned sendfile; | |
81 unsigned need_in_memory; | |
82 unsigned need_in_temp; | |
83 | |
84 ngx_pool_t *pool; | |
85 ngx_int_t allocated; | |
86 ngx_bufs_t bufs; | |
87 ngx_buf_tag_t tag; | |
88 | |
89 ngx_output_chain_filter_pt output_filter; | |
90 void *filter_ctx; | |
91 } ngx_output_chain_ctx_t; | |
92 | |
93 | |
94 typedef struct { | |
95 ngx_chain_t *out; | |
96 ngx_chain_t **last; | |
97 ngx_connection_t *connection; | |
98 ngx_pool_t *pool; | |
99 off_t limit; | |
100 } ngx_chain_writer_ctx_t; | |
101 | |
102 | |
103 #define NGX_CHAIN_ERROR (ngx_chain_t *) NGX_ERROR | |
104 | |
105 | |
106 #define ngx_buf_in_memory(b) (b->temporary || b->memory || b->mmap) | |
107 #define ngx_buf_in_memory_only(b) (ngx_buf_in_memory(b) && !b->in_file) | |
108 #define ngx_buf_special(b) \ | |
58 | 109 ((b->flush || b->last_buf || b->sync) \ |
110 && !ngx_buf_in_memory(b) && !b->in_file) | |
0 | 111 |
112 #define ngx_buf_size(b) \ | |
48 | 113 (ngx_buf_in_memory(b) ? (off_t) (b->last - b->pos): \ |
114 (b->file_last - b->file_pos)) | |
0 | 115 |
116 ngx_buf_t *ngx_create_temp_buf(ngx_pool_t *pool, size_t size); | |
117 ngx_chain_t *ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs); | |
118 | |
119 | |
120 #define ngx_alloc_buf(pool) ngx_palloc(pool, sizeof(ngx_buf_t)) | |
121 #define ngx_calloc_buf(pool) ngx_pcalloc(pool, sizeof(ngx_buf_t)) | |
122 | |
56 | 123 ngx_chain_t *ngx_alloc_chain_link(ngx_pool_t *pool); |
124 #define ngx_free_chain(pool, cl) \ | |
125 cl->next = pool->chain; \ | |
126 pool->chain = cl | |
127 | |
0 | 128 |
129 | |
130 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in); | |
28 | 131 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in); |
0 | 132 |
133 ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, | |
48 | 134 ngx_chain_t *in); |
0 | 135 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, |
48 | 136 ngx_chain_t **out, ngx_buf_tag_t tag); |
0 | 137 |
138 | |
139 #endif /* _NGX_BUF_H_INCLUDED_ */ |