From 9fa5a823c467c8ba13f8edff3c7d3c6dc75ea1d4 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 30 Sep 2005 14:41:25 +0000 Subject: nginx-0.2.2-RELEASE import *) Feature: the "config errmsg" command of the ngx_http_ssi_module. *) Change: the ngx_http_geo_module variables can be overridden by the "set" directive. *) Feature: the "ssl_protocols" and "ssl_prefer_server_ciphers" directives of the ngx_http_ssl_module and ngx_imap_ssl_module. *) Bugfix: the ngx_http_autoindex_module did not show correctly the long file names; *) Bugfix: the ngx_http_autoindex_module now do not show the files starting by dot. *) Bugfix: if the SSL handshake failed then another connection may be closed too. Thanks to Rob Mueller. *) Bugfix: the export versions of MSIE 5.x could not connect via HTTPS. --- src/http/modules/ngx_http_autoindex_module.c | 25 ++--- src/http/modules/ngx_http_fastcgi_module.c | 2 +- src/http/modules/ngx_http_geo_module.c | 2 +- src/http/modules/ngx_http_gzip_filter_module.c | 2 +- src/http/modules/ngx_http_proxy_module.c | 2 +- src/http/modules/ngx_http_ssi_filter_module.c | 23 +++-- src/http/modules/ngx_http_ssl_module.c | 126 +++++++++++-------------- src/http/modules/ngx_http_ssl_module.h | 9 +- 8 files changed, 93 insertions(+), 98 deletions(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index fb40669ba..d5a6b69ba 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -271,21 +271,14 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) len = ngx_de_namelen(&dir); - if (len == 1 && ngx_de_name(&dir)[0] == '.') { - continue; - } - - if (len == 2 - && ngx_de_name(&dir)[0] == '.' - && ngx_de_name(&dir)[1] == '.') - { + if (ngx_de_name(&dir)[0] == '.') { continue; } if (!dir.valid_info) { - if (dname.len + 1 + len > fname.len) { - fname.len = dname.len + 1 + len + 32; + if (dname.len + 1 + len + 1 > fname.len) { + fname.len = dname.len + 1 + len + 1 + 32; fname.data = ngx_palloc(pool, fname.len); if (fname.data == NULL) { @@ -468,7 +461,8 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) } else { if (entry[i].dir) { - b->last = ngx_cpymem(b->last, " -", sizeof(" -") - 1); + b->last = ngx_cpymem(b->last, " -", + sizeof(" -") - 1); } else { length = entry[i].size; @@ -498,13 +492,14 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) } else { size = (ngx_int_t) length; - scale = ' '; + scale = '\0'; } - b->last = ngx_sprintf(b->last, "%6i", size); + if (scale) { + b->last = ngx_sprintf(b->last, "%6i%c", size, scale); - if (scale != ' ') { - *b->last++ = scale; + } else { + b->last = ngx_sprintf(b->last, " %6i", size); } } } diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 6efac3df6..9b317f9d9 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -293,7 +293,7 @@ static ngx_command_t ngx_http_fastcgi_commands[] = { NULL }, { ngx_string("fastcgi_next_upstream"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_ANY, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_fastcgi_loc_conf_t, upstream.next_upstream), diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 834282b16..2031a4c0b 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -117,7 +117,7 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) name.data++; } - var = ngx_http_add_variable(cf, &name, 0); + var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGABLE); if (var == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index c37f79cb7..012ea4581 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -181,7 +181,7 @@ static ngx_command_t ngx_http_gzip_filter_commands[] = { &ngx_http_gzip_http_version }, { ngx_string("gzip_proxied"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_ANY, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_gzip_conf_t, proxied), diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index c807df94d..a7fd74172 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -244,7 +244,7 @@ static ngx_command_t ngx_http_proxy_commands[] = { NULL }, { ngx_string("proxy_next_upstream"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_ANY, + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE, ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(ngx_http_proxy_loc_conf_t, upstream.next_upstream), diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index 0f3829594..f3eb093d3 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -59,6 +59,7 @@ typedef struct { ngx_uint_t output; /* unsigned output:1; */ ngx_str_t timefmt; + ngx_str_t errmsg; } ngx_http_ssi_ctx_t; @@ -217,8 +218,6 @@ static ngx_int_t (*ngx_http_next_body_filter) (ngx_http_request_t *r, static u_char ngx_http_ssi_string[] = "