Mercurial > hg > nginx-vendor-current
annotate src/core/ngx_file.h @ 122:d25a1d6034f1 NGINX_0_3_8
nginx 0.3.8
*) Security: nginx now checks URI got from a backend in
"X-Accel-Redirect" header line or in SSI file for the "/../" paths
and zeroes.
*) Change: nginx now does not treat the empty user name in the
"Authorization" header line as valid one.
*) Feature: the "ssl_session_timeout" directives of the
ngx_http_ssl_module and ngx_imap_ssl_module.
*) Feature: the "auth_http_header" directive of the
ngx_imap_auth_http_module.
*) Feature: the "add_header" directive.
*) Feature: the ngx_http_realip_module.
*) Feature: the new variables to use in the "log_format" directive:
$bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri,
$request_time, $request_length, $upstream_status,
$upstream_response_time, $gzip_ratio, $uid_got, $uid_set,
$connection, $pipe, and $msec. The parameters in the "%name" form
will be canceled soon.
*) Change: now the false variable values in the "if" directive are the
empty string "" and string starting with "0".
*) Bugfix: while using proxied or FastCGI-server nginx may leave
connections and temporary files with client requests in open state.
*) Bugfix: the worker processes did not flush the buffered logs on
graceful exit.
*) Bugfix: if the request URI was changes by the "rewrite" directive
and the request was proxied in location given by regular expression,
then the incorrect request was transferred to backend; bug appeared
in 0.2.6.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" header.
*) Bugfix: nginx may stop to accept requests if the "rtsig" method and
several worker processes were used.
*) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in
SSI commands.
*) Bugfix: if the response was ended just after the SSI command and
gzipping was used, then the response did not transferred complete or
did not transferred at all.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 09 Nov 2005 00:00:00 +0300 |
parents | dad2fe8ecf08 |
children | 13710a1813ad |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_FILE_H_INCLUDED_ | |
8 #define _NGX_FILE_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 | |
14 typedef struct ngx_path_s ngx_path_t; | |
15 | |
16 #include <ngx_garbage_collector.h> | |
17 | |
18 | |
19 struct ngx_file_s { | |
16 | 20 ngx_fd_t fd; |
21 ngx_str_t name; | |
22 ngx_file_info_t info; | |
0 | 23 |
16 | 24 off_t offset; |
25 off_t sys_offset; | |
0 | 26 |
16 | 27 ngx_log_t *log; |
0 | 28 |
48 | 29 ngx_uint_t valid_info; /* unsigned valid_info:1; */ |
0 | 30 }; |
31 | |
32 #define NGX_MAX_PATH_LEVEL 3 | |
33 | |
34 struct ngx_path_s { | |
35 ngx_str_t name; | |
66 | 36 size_t len; |
37 size_t level[3]; | |
28 | 38 ngx_gc_handler_pt cleaner; |
16 | 39 |
40 u_char *conf_file; | |
41 ngx_uint_t line; | |
0 | 42 }; |
43 | |
44 | |
45 typedef struct { | |
16 | 46 ngx_file_t file; |
47 off_t offset; | |
48 ngx_path_t *path; | |
49 ngx_pool_t *pool; | |
50 char *warn; | |
0 | 51 |
16 | 52 unsigned persistent:1; |
0 | 53 } ngx_temp_file_t; |
54 | |
55 | |
16 | 56 ssize_t ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain); |
57 ngx_int_t ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, | |
110 | 58 ngx_pool_t *pool, ngx_uint_t persistent); |
0 | 59 void ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path); |
16 | 60 ngx_int_t ngx_create_path(ngx_file_t *file, ngx_path_t *path); |
28 | 61 ngx_int_t ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot); |
16 | 62 ngx_int_t ngx_create_pathes(ngx_cycle_t *cycle, ngx_uid_t user); |
0 | 63 |
48 | 64 void ngx_init_temp_number(void); |
44 | 65 ngx_atomic_uint_t ngx_next_temp_number(ngx_uint_t collision); |
0 | 66 |
67 char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | |
68 | |
69 | |
28 | 70 #define ngx_conf_merge_path_value(curr, prev, path, l1, l2, l3, clean, cf) \ |
71 if (curr == NULL) { \ | |
72 if (prev == NULL) { \ | |
50 | 73 curr = ngx_palloc(cf->pool, sizeof(ngx_path_t)); \ |
74 if (curr == NULL) { \ | |
28 | 75 return NGX_CONF_ERROR; \ |
76 } \ | |
77 \ | |
78 curr->name.len = sizeof(path) - 1; \ | |
79 curr->name.data = (u_char *) path; \ | |
80 \ | |
81 if (ngx_conf_full_name(cf->cycle, &curr->name) == NGX_ERROR) { \ | |
82 return NGX_CONF_ERROR; \ | |
83 } \ | |
84 \ | |
85 curr->level[0] = l1; \ | |
86 curr->level[1] = l2; \ | |
87 curr->level[2] = l3; \ | |
88 curr->len = l1 + l2 + l3 + (l1 ? 1:0) + (l2 ? 1:0) + (l3 ? 1:0); \ | |
89 curr->cleaner = clean; \ | |
90 curr->conf_file = NULL; \ | |
91 \ | |
92 if (ngx_add_path(cf, &curr) == NGX_ERROR) { \ | |
93 return NGX_CONF_ERROR; \ | |
94 } \ | |
95 \ | |
96 } else { \ | |
97 curr = prev; \ | |
98 } \ | |
0 | 99 } |
100 | |
101 | |
102 | |
103 #endif /* _NGX_FILE_H_INCLUDED_ */ |