Mercurial > hg > nginx-vendor-0-7
annotate src/core/ngx_buf.h @ 506:b9fdcaf2062b NGINX_0_7_65
nginx 0.7.65
*) Security: now nginx/Windows ignores trailing spaces in URI.
Thanks to Dan Crowley, Core Security Technologies.
*) Security: now nginx/Windows ignores short files names.
Thanks to Dan Crowley, Core Security Technologies.
*) Change: now the "009" status code is written to an access log for
proxied HTTP/0.9 responses.
*) Change: now the default buffer size of the
"large_client_header_buffers" directive is 8K.
Thanks to Andrew Cholakian.
*) Change: now default SSL ciphers are "HIGH:!ADH:!MD5".
*) Change: now SSLv2 protocol is disabled by default.
*) Change: now $host variable value is always low case.
*) Feature: the conf/fastcgi.conf for simple FastCGI configurations.
*) Feature: now URI part is not required a "proxy_pass" directive if
variables are used.
*) Feature: the $ssl_session_id variable.
*) Bugfix: if a proxied or FastCGI request was internally redirected to
another proxied or FastCGI location, then $upstream_response_time
variable may have abnormally large value; the bug had appeared in
0.7.63.
*) Bugfix: if the "expires modified" set date in the past, then a
negative number was set in the "Cache-Control" response header
line.
Thanks to Alex Kapranoff.
*) Bugfix: nginx closed a connection if a cached response had an empty
body.
Thanks to Piotr Sikora.
*) Bugfix: nginx cached a 304 response if there was the "If-None-Match"
header line in a proxied request.
Thanks to Tim Dettrick and David Kostal.
*) Bugfix: nginx did not treat a comma as separator in the
"Cache-Control" backend response header line.
*) Bugfix: cached HTTP/0.9 responses were handled incorrectly.
*) Bugfix: nginx sent gzipped responses to clients those do not support
gzip, if "gzip_static on" and "gzip_vary off"; the bug had appeared
in 0.8.16.
*) Bugfix: nginx always added "Content-Encoding: gzip" response header
line in 304 responses sent by ngx_http_gzip_static_module.
*) Bugfix: the "!-x" operator did not work.
Thanks to Maxim Dounin.
*) Bugfix: a segmentation fault might occur in a worker process, if
limit_rate was used in HTTPS server.
Thanks to Maxim Dounin.
*) Bugfix: a segmentation fault might occur in a worker process while
$limit_rate logging.
Thanks to Maxim Dounin.
*) Bugfix: nginx did not support dates in 2038 year on 32-bit platforms;
*) Bugfix: nginx/Windows tried to delete a temporary file twice if the
file should replace an already existent file.
*) Bugfix: nginx/Windows tried to rename a temporary file twice if the
file should replace an already existent file.
*) Bugfix: nginx/Windows might not create temporary file, a cache file,
or "proxy/fastcgi_store"d file if a worker had no enough access
rights for top level directories.
*) Bugfix: in UTF-8 encoding support by "try_files" directive in
nginx/Windows.
*) Bugfix: UTF-8 encoding usage in the ngx_http_autoindex_module.
Thanks to Maxim Dounin.
*) Bugfix: the ngx_http_autoindex_module did not show the trailing
slash in links to a directory; the bug had appeared in 0.7.15.
*) Bugfix: nginx did not close a log file set by the --error-log-path
configuration option; the bug had appeared in 0.7.53.
*) Bugfix: "addition_types" directive was incorrectly named
"addtion_types".
*) Bugfix: invalid request line in $request variable was written in
access_log only if error_log was set to "info" or "debug" level.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 00:00:00 +0000 |
parents | ed3d382670c7 |
children |
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 /* STUB */ int num; | |
55 }; | |
56 | |
57 | |
58 struct ngx_chain_s { | |
59 ngx_buf_t *buf; | |
60 ngx_chain_t *next; | |
61 }; | |
62 | |
63 | |
64 typedef struct { | |
65 ngx_int_t num; | |
66 size_t size; | |
67 } ngx_bufs_t; | |
68 | |
69 | |
28 | 70 typedef ngx_int_t (*ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in); |
0 | 71 |
72 typedef struct { | |
73 ngx_buf_t *buf; | |
74 ngx_chain_t *in; | |
75 ngx_chain_t *free; | |
76 ngx_chain_t *busy; | |
77 | |
500 | 78 unsigned sendfile:1; |
79 unsigned directio:1; | |
410 | 80 #if (NGX_HAVE_ALIGNED_DIRECTIO) |
500 | 81 unsigned unaligned:1; |
410 | 82 #endif |
500 | 83 unsigned need_in_memory:1; |
84 unsigned need_in_temp:1; | |
0 | 85 |
86 ngx_pool_t *pool; | |
87 ngx_int_t allocated; | |
88 ngx_bufs_t bufs; | |
89 ngx_buf_tag_t tag; | |
90 | |
91 ngx_output_chain_filter_pt output_filter; | |
92 void *filter_ctx; | |
93 } ngx_output_chain_ctx_t; | |
94 | |
95 | |
96 typedef struct { | |
97 ngx_chain_t *out; | |
98 ngx_chain_t **last; | |
99 ngx_connection_t *connection; | |
100 ngx_pool_t *pool; | |
101 off_t limit; | |
102 } ngx_chain_writer_ctx_t; | |
103 | |
104 | |
105 #define NGX_CHAIN_ERROR (ngx_chain_t *) NGX_ERROR | |
106 | |
107 | |
108 #define ngx_buf_in_memory(b) (b->temporary || b->memory || b->mmap) | |
109 #define ngx_buf_in_memory_only(b) (ngx_buf_in_memory(b) && !b->in_file) | |
144 | 110 |
0 | 111 #define ngx_buf_special(b) \ |
58 | 112 ((b->flush || b->last_buf || b->sync) \ |
113 && !ngx_buf_in_memory(b) && !b->in_file) | |
0 | 114 |
144 | 115 #define ngx_buf_sync_only(b) \ |
116 (b->sync \ | |
117 && !ngx_buf_in_memory(b) && !b->in_file && !b->flush && !b->last_buf) | |
118 | |
0 | 119 #define ngx_buf_size(b) \ |
48 | 120 (ngx_buf_in_memory(b) ? (off_t) (b->last - b->pos): \ |
121 (b->file_last - b->file_pos)) | |
0 | 122 |
123 ngx_buf_t *ngx_create_temp_buf(ngx_pool_t *pool, size_t size); | |
124 ngx_chain_t *ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs); | |
125 | |
126 | |
127 #define ngx_alloc_buf(pool) ngx_palloc(pool, sizeof(ngx_buf_t)) | |
128 #define ngx_calloc_buf(pool) ngx_pcalloc(pool, sizeof(ngx_buf_t)) | |
129 | |
56 | 130 ngx_chain_t *ngx_alloc_chain_link(ngx_pool_t *pool); |
131 #define ngx_free_chain(pool, cl) \ | |
132 cl->next = pool->chain; \ | |
133 pool->chain = cl | |
134 | |
0 | 135 |
136 | |
137 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in); | |
28 | 138 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in); |
0 | 139 |
140 ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, | |
48 | 141 ngx_chain_t *in); |
130 | 142 ngx_chain_t *ngx_chain_get_free_buf(ngx_pool_t *p, ngx_chain_t **free); |
0 | 143 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, |
48 | 144 ngx_chain_t **out, ngx_buf_tag_t tag); |
0 | 145 |
146 | |
147 #endif /* _NGX_BUF_H_INCLUDED_ */ |