Mercurial > hg > nginx
comparison src/core/ngx_conf_file.c @ 629:65bf042c0b4f release-0.3.36
nginx-0.3.36-RELEASE import
*) Feature: the ngx_http_addition_filter_module.
*) Feature: the "proxy_pass" and "fastcgi_pass" directives may be used
inside the "if" block.
*) Feature: the "proxy_ignore_client_abort" and
"fastcgi_ignore_client_abort" directives.
*) Feature: the "$request_completion" variable.
*) Feature: the ngx_http_perl_module supports the $r->request_method
and $r->remote_addr.
*) Feature: the ngx_http_ssi_module supports the "elif" command.
*) Bugfix: the "\/" string in the expression of the "if" command of the
ngx_http_ssi_module was treated incorrectly.
*) Bugfix: in the regular expressions in the "if" command of the
ngx_http_ssi_module.
*) Bugfix: if the relative path was specified in the
"client_body_temp_path", "proxy_temp_path", "fastcgi_temp_path", and
"perl_modules" directives, then the directory was used relatively to
a current path but not to a server prefix.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 05 Apr 2006 13:40:54 +0000 |
parents | 5dac8c7fb71b |
children | 4946078f0a79 |
comparison
equal
deleted
inserted
replaced
628:b338276e1aab | 629:65bf042c0b4f |
---|---|
61 ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename) | 61 ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename) |
62 { | 62 { |
63 char *rv; | 63 char *rv; |
64 ngx_fd_t fd; | 64 ngx_fd_t fd; |
65 ngx_int_t rc; | 65 ngx_int_t rc; |
66 ngx_buf_t *b; | |
66 ngx_uint_t block; | 67 ngx_uint_t block; |
67 ngx_conf_file_t *prev; | 68 ngx_conf_file_t *prev; |
68 | 69 |
69 #if (NGX_SUPPRESS_WARN) | 70 #if (NGX_SUPPRESS_WARN) |
70 fd = NGX_INVALID_FILE; | 71 fd = NGX_INVALID_FILE; |
93 if (ngx_fd_info(fd, &cf->conf_file->file.info) == -1) { | 94 if (ngx_fd_info(fd, &cf->conf_file->file.info) == -1) { |
94 ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno, | 95 ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno, |
95 ngx_fd_info_n " \"%s\" failed", filename->data); | 96 ngx_fd_info_n " \"%s\" failed", filename->data); |
96 } | 97 } |
97 | 98 |
98 cf->conf_file->buffer = ngx_create_temp_buf(cf->pool, ngx_pagesize); | 99 b = ngx_calloc_buf(cf->pool); |
99 if (cf->conf_file->buffer == NULL) { | 100 if (b == NULL) { |
100 return NGX_CONF_ERROR; | 101 return NGX_CONF_ERROR; |
101 } | 102 } |
103 | |
104 cf->conf_file->buffer = b; | |
105 | |
106 b->start = ngx_alloc(ngx_pagesize, cf->log); | |
107 if (b->start == NULL) { | |
108 return NGX_CONF_ERROR; | |
109 } | |
110 | |
111 b->pos = b->start; | |
112 b->last = b->start; | |
113 b->end = b->last + ngx_pagesize; | |
114 b->temporary = 1; | |
102 | 115 |
103 cf->conf_file->file.fd = fd; | 116 cf->conf_file->file.fd = fd; |
104 cf->conf_file->file.name.len = filename->len; | 117 cf->conf_file->file.name.len = filename->len; |
105 cf->conf_file->file.name.data = filename->data; | 118 cf->conf_file->file.name.data = filename->data; |
106 cf->conf_file->file.offset = 0; | 119 cf->conf_file->file.offset = 0; |
181 } | 194 } |
182 } | 195 } |
183 | 196 |
184 | 197 |
185 if (filename) { | 198 if (filename) { |
186 ngx_pfree(cf->pool, cf->conf_file->buffer->start); | 199 ngx_free(cf->conf_file->buffer->start); |
187 | 200 |
188 cf->conf_file = prev; | 201 cf->conf_file = prev; |
189 | 202 |
190 if (ngx_close_file(fd) == NGX_FILE_ERROR) { | 203 if (ngx_close_file(fd) == NGX_FILE_ERROR) { |
191 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, | 204 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, |