Mercurial > hg > nginx-vendor-0-7
annotate src/core/ngx_open_file_cache.h @ 502:89dc5654117c NGINX_0_7_63
nginx 0.7.63
*) Security: now "/../" are disabled in "Destination" request header
line.
*) Change: minimum supported OpenSSL version is 0.9.7.
*) Change: the "ask" parameter of the "ssl_verify_client" directive was
changed to the "optional" parameter and now it checks a client
certificate if it was offered.
Thanks to Brice Figureau.
*) Feature: now the "-V" switch shows TLS SNI support.
*) Feature: the $ssl_client_verify variable.
Thanks to Brice Figureau.
*) Feature: the "ssl_crl" directive.
Thanks to Brice Figureau.
*) Bugfix: the $ssl_client_cert variable usage corrupted memory; the
bug had appeared in 0.7.7.
Thanks to Sergey Zhuravlev.
*) Feature: now the start cache loader runs in a separate process; this
should improve large caches handling.
*) Feature: now temporary files and permanent storage area may reside
at different file systems.
*) Bugfix: nginx counted incorrectly disk cache size.
*) Change: now directive "gzip_disable msie6" does not disable gzipping
for MSIE 6.0 SV1.
*) Bugfix: nginx always added "Vary: Accept-Encoding" response header
line, if both "gzip_static" and "gzip_vary" were on.
*) Feature: the "proxy" parameter of the "geo" directive.
*) Feature: the ngx_http_geoip_module.
*) Feature: the "limit_rate_after" directive.
Thanks to Ivan Debnar.
*) Feature: the "limit_req_log_level" and "limit_conn_log_level"
directives.
*) Bugfix: now "limit_req" directive conforms to the leaky bucket
algorithm.
Thanks to Maxim Dounin.
*) Bugfix: in ngx_http_limit_req_module.
Thanks to Maxim Dounin.
*) Bugfix: now nginx allows underscores in a request method.
*) Bugfix: "proxy_pass_header" and "fastcgi_pass_header" directives did
not pass to a client the "X-Accel-Redirect", "X-Accel-Limit-Rate",
"X-Accel-Buffering", and "X-Accel-Charset" lines from backend
response header.
Thanks to Maxim Dounin.
*) Bugfix: in handling "Last-Modified" and "Accept-Ranges" backend
response header lines; the bug had appeared in 0.7.44.
Thanks to Maxim Dounin.
*) Feature: the "image_filter_transparency" directive.
*) Feature: the "image_filter" directive supports variables for setting
size.
*) Bugfix: in PNG alpha-channel support in the
ngx_http_image_filter_module.
*) Bugfix: in transparency support in the ngx_http_image_filter_module.
*) Feature: now several "perl_modules" directives may be used.
*) Bugfix: ngx_http_perl_module responses did not work in subrequests.
*) Bugfix: nginx sent '\0' in a "Location" response header line on
MKCOL request.
Thanks to Xie Zhenye.
*) Bugfix: an "error_page" directive did not redirect a 413 error; the
bug had appeared in 0.6.10.
*) Bugfix: in memory allocation error handling.
Thanks to Maxim Dounin and Kirill A. Korinskiy.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 26 Oct 2009 00:00:00 +0300 |
parents | 392c16f2d858 |
children |
rev | line source |
---|---|
332 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <ngx_config.h> | |
8 #include <ngx_core.h> | |
9 | |
10 | |
11 #ifndef _NGX_OPEN_FILE_CACHE_H_INCLUDED_ | |
12 #define _NGX_OPEN_FILE_CACHE_H_INCLUDED_ | |
13 | |
14 | |
416 | 15 #define NGX_OPEN_FILE_DIRECTIO_OFF NGX_MAX_OFF_T_VALUE |
16 | |
17 | |
332 | 18 typedef struct { |
19 ngx_fd_t fd; | |
20 ngx_file_uniq_t uniq; | |
21 time_t mtime; | |
22 off_t size; | |
390 | 23 off_t directio; |
482 | 24 |
332 | 25 ngx_err_t err; |
482 | 26 char *failed; |
332 | 27 |
358 | 28 time_t valid; |
29 | |
30 ngx_uint_t min_uses; | |
332 | 31 |
32 unsigned test_dir:1; | |
482 | 33 unsigned test_only:1; |
384 | 34 unsigned log:1; |
332 | 35 unsigned errors:1; |
36 unsigned events:1; | |
37 | |
38 unsigned is_dir:1; | |
39 unsigned is_file:1; | |
40 unsigned is_link:1; | |
41 unsigned is_exec:1; | |
406 | 42 unsigned is_directio:1; |
332 | 43 } ngx_open_file_info_t; |
44 | |
45 | |
46 typedef struct ngx_cached_open_file_s ngx_cached_open_file_t; | |
47 | |
48 struct ngx_cached_open_file_s { | |
49 ngx_rbtree_node_t node; | |
358 | 50 ngx_queue_t queue; |
332 | 51 |
52 u_char *name; | |
53 time_t created; | |
54 time_t accessed; | |
55 | |
56 ngx_fd_t fd; | |
57 ngx_file_uniq_t uniq; | |
58 time_t mtime; | |
59 off_t size; | |
60 ngx_err_t err; | |
61 | |
358 | 62 uint32_t uses; |
63 | |
332 | 64 unsigned count:24; |
65 unsigned close:1; | |
358 | 66 unsigned use_event:1; |
332 | 67 |
68 unsigned is_dir:1; | |
69 unsigned is_file:1; | |
70 unsigned is_link:1; | |
71 unsigned is_exec:1; | |
410 | 72 unsigned is_directio:1; |
332 | 73 |
74 ngx_event_t *event; | |
75 }; | |
76 | |
77 | |
78 typedef struct { | |
79 ngx_rbtree_t rbtree; | |
358 | 80 ngx_rbtree_node_t sentinel; |
81 ngx_queue_t expire_queue; | |
332 | 82 |
83 ngx_uint_t current; | |
84 ngx_uint_t max; | |
85 time_t inactive; | |
86 } ngx_open_file_cache_t; | |
87 | |
88 | |
89 typedef struct { | |
90 ngx_open_file_cache_t *cache; | |
91 ngx_cached_open_file_t *file; | |
358 | 92 ngx_uint_t min_uses; |
332 | 93 ngx_log_t *log; |
94 } ngx_open_file_cache_cleanup_t; | |
95 | |
96 | |
97 typedef struct { | |
98 | |
99 /* ngx_connection_t stub to allow use c->fd as event ident */ | |
100 void *data; | |
101 ngx_event_t *read; | |
102 ngx_event_t *write; | |
103 ngx_fd_t fd; | |
104 | |
105 ngx_cached_open_file_t *file; | |
106 ngx_open_file_cache_t *cache; | |
107 } ngx_open_file_cache_event_t; | |
108 | |
109 | |
110 ngx_open_file_cache_t *ngx_open_file_cache_init(ngx_pool_t *pool, | |
111 ngx_uint_t max, time_t inactive); | |
112 ngx_int_t ngx_open_cached_file(ngx_open_file_cache_t *cache, ngx_str_t *name, | |
113 ngx_open_file_info_t *of, ngx_pool_t *pool); | |
114 | |
115 | |
116 #endif /* _NGX_OPEN_FILE_CACHE_H_INCLUDED_ */ |