aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_conf_file.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-10-21 15:34:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-10-21 15:34:38 +0000
commitc0edbcce58b03b89c70f1eb39cb44c74c4c7453a (patch)
tree1ce72a5b51d724a0c054e079c2b1507ca85a145d /src/core/ngx_conf_file.c
parentac64333a44f39d5a658832517a106961f32f6aae (diff)
downloadnginx-c0edbcce58b03b89c70f1eb39cb44c74c4c7453a.tar.gz
nginx-c0edbcce58b03b89c70f1eb39cb44c74c4c7453a.zip
nginx-0.1.2-RELEASE importrelease-0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS options in configure. *) Feature: the server_name directive supports *.domain.tld. *) Bugfix: the portability improvements. *) Bugfix: if configuration file was set in command line, the reconfiguration was impossible; the bug had appeared in 0.1.1. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used. *) Bugfix: with sendfile the response was not recoded according to the charset module directives; the bug had appeared in 0.1.1. *) Bugfix: very seldom bug in the kqueue processing. *) Bugfix: the gzip module compressed the proxied responses that was already compressed.
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r--src/core/ngx_conf_file.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 90a09d231..fb629a439 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -579,8 +579,18 @@ ngx_int_t ngx_conf_full_name(ngx_cycle_t *cycle, ngx_str_t *name)
name->len = cycle->root.len + old.len;
- if (!(name->data = ngx_palloc(cycle->pool, name->len + 1))) {
- return NGX_ERROR;
+ if (cycle->connections) {
+ if (!(name->data = ngx_palloc(cycle->pool, name->len + 1))) {
+ return NGX_ERROR;
+ }
+
+ } else {
+
+ /* the init_cycle */
+
+ if (!(name->data = ngx_alloc(name->len + 1, cycle->log))) {
+ return NGX_ERROR;
+ }
}
p = ngx_cpymem(name->data, cycle->root.data, cycle->root.len),