diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-05-26 18:12:40 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-05-26 18:12:40 +0000 |
commit | 403d2443a38f0df9da01c6649ddfd49ab4b6a7e2 (patch) | |
tree | 21383258d4f7718cafe79604aa2af63e993620ab | |
parent | 3144ab6c01a5776947a5cb60e04f1b1ba69ad9e0 (diff) | |
download | nginx-403d2443a38f0df9da01c6649ddfd49ab4b6a7e2.tar.gz nginx-403d2443a38f0df9da01c6649ddfd49ab4b6a7e2.zip |
nginx-0.1.34-RELEASE importrelease-0.1.34
*) Bugfix: the worker process may got caught in an endless loop if the
big response part were include by SSI.
*) Bugfix: the variables set by the "set" directive were not available
in SSI.
*) Feature: the "autoindex_localtime" directive.
*) Bugfix: the empty value of the "proxy_set_header" directive forbids
the client request header line passing.
-rw-r--r-- | auto/cc/icc | 6 | ||||
-rw-r--r-- | docs/xml/nginx/changes.xml | 43 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_autoindex_module.c | 12 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 4 | ||||
-rw-r--r-- | src/http/modules/ngx_http_rewrite_module.c | 2 | ||||
-rw-r--r-- | src/http/ngx_http_postpone_filter_module.c | 7 | ||||
-rw-r--r-- | src/http/ngx_http_variables.c | 9 | ||||
-rw-r--r-- | src/http/ngx_http_variables.h | 1 |
9 files changed, 79 insertions, 7 deletions
diff --git a/auto/cc/icc b/auto/cc/icc index b6ae759fb..a0f676e6d 100644 --- a/auto/cc/icc +++ b/auto/cc/icc @@ -64,12 +64,16 @@ CFLAGS="$CFLAGS -wd171" CFLAGS="$CFLAGS -wd181" # zero used for undefined preprocessing identifier CFLAGS="$CFLAGS -wd193" +#the format string ends before this argument +CFLAGS="$CFLAGS -wd268" # invalid format string conversion CFLAGS="$CFLAGS -wd269" # conversion from "long long" to "size_t" may lose significant bits CFLAGS="$CFLAGS -wd810" # parameter was never referenced CFLAGS="$CFLAGS -wd869" +# "cc" clobber ignored, warnings for Liunx's htons() +CFLAGS="$CFLAGS -wd1469" # STUB # enumerated type mixed with another type @@ -82,6 +86,8 @@ CFLAGS="$CFLAGS -wd981" CFLAGS="$CFLAGS -wd1418" # external declaration in primary source file CFLAGS="$CFLAGS -wd1419" +# non-POD class type passed through ellipsis +CFLAGS="$CFLAGS -wd1595" # stop on warning CFLAGS="$CFLAGS -Werror" diff --git a/docs/xml/nginx/changes.xml b/docs/xml/nginx/changes.xml index f65c70589..4938d466c 100644 --- a/docs/xml/nginx/changes.xml +++ b/docs/xml/nginx/changes.xml @@ -9,6 +9,49 @@ <title lang="en">nginx changelog</title> +<changes ver="0.1.34" date="26.05.2005"> + +<change type="bugfix"> +<para lang="ru"> +при включении больших ответов с помощью SSI рабочий процесс мог зациклиться. +</para> +<para lang="en"> +the worker process may got caught in an endless loop if the big response +part were include by SSI. +</para> +</change> + +<change type="bugfix"> +<para lang="ru"> +переменные, устанавливаемые директивой "set", не были доступны в SSI. +</para> +<para lang="en"> +the variables set by the "set" directive were not available in SSI. +</para> +</change> + +<change type="feature"> +<para lang="ru"> +директива autoindex_localtime. +</para> +<para lang="en"> +the "autoindex_localtime" directive. +</para> +</change> + +<change type="bugfix"> +<para lang="ru"> +пустое значение в директиве proxy_set_header запрещает передачу заголовка. +</para> +<para lang="en"> +the empty value of the "proxy_set_header" directive forbids the client +request header line passing. +</para> +</change> + +</changes> + + <changes ver="0.1.33" date="23.05.2005"> <change type="bugfix"> diff --git a/src/core/nginx.h b/src/core/nginx.h index efc35b85e..1a08c424f 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.1.33" +#define NGINX_VER "nginx/0.1.34" #define NGINX_VAR "NGINX" #define NGX_NEWPID_EXT ".newbin" diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index 76c5b0314..96ab81e48 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -33,6 +33,7 @@ typedef struct { typedef struct { ngx_flag_t enable; + ngx_flag_t localtime; } ngx_http_autoindex_loc_conf_t; @@ -58,6 +59,13 @@ static ngx_command_t ngx_http_autoindex_commands[] = { offsetof(ngx_http_autoindex_loc_conf_t, enable), NULL }, + { ngx_string("autoindex_localtime"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, + ngx_conf_set_flag_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_autoindex_loc_conf_t, localtime), + NULL }, + ngx_null_command }; @@ -391,7 +399,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) *b->last++ = ' '; - ngx_gmtime(entry[i].mtime, &tm); + ngx_gmtime(entry[i].mtime + ngx_gmtoff * 60 * alcf->localtime, &tm); b->last = ngx_sprintf(b->last, "%02d-%s-%d %02d:%02d ", tm.ngx_tm_mday, @@ -542,6 +550,7 @@ ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf) } conf->enable = NGX_CONF_UNSET; + conf->localtime = NGX_CONF_UNSET; return conf; } @@ -554,6 +563,7 @@ ngx_http_autoindex_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) ngx_http_autoindex_loc_conf_t *conf = child; ngx_conf_merge_value(conf->enable, prev->enable, 0); + ngx_conf_merge_value(conf->localtime, prev->localtime, 0); return NGX_CONF_OK; } diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 92dd6cc9c..0211dab06 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1576,6 +1576,10 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) *name = src[i].key; + if (src[i].value.len == 0) { + continue; + } + if (ngx_http_script_variables_count(&src[i].value) == 0) { copy = ngx_array_push_n(conf->headers_set_len, sizeof(ngx_http_script_copy_code_t)); diff --git a/src/http/modules/ngx_http_rewrite_module.c b/src/http/modules/ngx_http_rewrite_module.c index da4719b7b..ed7abd66a 100644 --- a/src/http/modules/ngx_http_rewrite_module.c +++ b/src/http/modules/ngx_http_rewrite_module.c @@ -313,7 +313,7 @@ ngx_http_rewrite_var(ngx_http_request_t *r, uintptr_t data) /* * the ngx_http_rewrite_module sets variables directly in r->variables, - * and they should be handle by ngx_http_get_indexed_variable(), + * and they should be handled by ngx_http_get_indexed_variable(), * so the handler is called only if the variable is not initialized */ diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c index 5c3e2c9c6..8e47816fb 100644 --- a/src/http/ngx_http_postpone_filter_module.c +++ b/src/http/ngx_http_postpone_filter_module.c @@ -45,6 +45,7 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) { ngx_int_t rc; ngx_chain_t *out; + ngx_http_request_t *mr; ngx_http_postponed_request_t *pr, **ppr; if (r->connection->write->error) { @@ -98,14 +99,16 @@ ngx_http_postpone_filter(ngx_http_request_t *r, ngx_chain_t *in) out = in; } - if (out == NULL && r->out == NULL && !r->connection->buffered) { + mr = r->main ? r->main : r; + + if (out == NULL && mr->out == NULL && !mr->connection->buffered) { return NGX_OK; } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http postpone filter out \"%V\"", &r->uri); - rc = ngx_http_next_filter(r->main ? r->main : r, out); + rc = ngx_http_next_filter(mr, out); if (rc == NGX_ERROR) { /* NGX_ERROR may be returned by any filter */ diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c index 12ab5154b..d66f0dc6c 100644 --- a/src/http/ngx_http_variables.c +++ b/src/http/ngx_http_variables.c @@ -276,7 +276,12 @@ ngx_http_get_variable(ngx_http_request_t *r, ngx_str_t *name) if (v[key].name.len == name->len && ngx_strncmp(v[key].name.data, name->data, name->len) == 0) { - return v[key].handler(r, v[key].data); + if (v[key].flags & NGX_HTTP_VAR_INDEXED) { + return ngx_http_get_indexed_variable(r, v[key].data); + + } else { + return v[key].handler(r, v[key].data); + } } if (ngx_strncmp(name->data, "http_", 5) == 0) { @@ -701,7 +706,7 @@ ngx_http_variables_init_vars(ngx_conf_t *cf) { v[i].handler = av[n].handler; v[i].data = av[n].data; - v[i].flags = av[n].flags; + v[i].flags = av[n].flags | NGX_HTTP_VAR_INDEXED; goto next; } diff --git a/src/http/ngx_http_variables.h b/src/http/ngx_http_variables.h index 6624535aa..d986c7d21 100644 --- a/src/http/ngx_http_variables.h +++ b/src/http/ngx_http_variables.h @@ -30,6 +30,7 @@ typedef ngx_http_variable_value_t * #define NGX_HTTP_VAR_CHANGABLE 1 #define NGX_HTTP_VAR_NOCACHABLE 2 +#define NGX_HTTP_VAR_INDEXED 4 struct ngx_http_variable_s { |