diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-12-05 13:15:03 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2005-12-05 13:15:03 +0000 |
commit | fe8aea1c269aa447b4b7af354f930523109fdccd (patch) | |
tree | 8014c454cffc4d954525547ce0ced027dcbb98c3 /src/http/modules | |
parent | 185275f41cc1032577af0f4a21ea6d4c85650a1a (diff) | |
download | nginx-fe8aea1c269aa447b4b7af354f930523109fdccd.tar.gz |
Changes with nginx 0.3.13 05 Dec 2005v0.3.13
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; bug appeared in 0.3.11.
Diffstat (limited to 'src/http/modules')
-rw-r--r-- | src/http/modules/ngx_http_auth_basic_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 3 | ||||
-rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 10 | ||||
-rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 10 | ||||
-rw-r--r-- | src/http/modules/ngx_http_referer_module.c | 3 | ||||
-rw-r--r-- | src/http/modules/ngx_http_ssi_filter_module.c | 6 | ||||
-rw-r--r-- | src/http/modules/ngx_http_static_module.c | 10 | ||||
-rw-r--r-- | src/http/modules/ngx_http_userid_filter_module.c | 4 |
9 files changed, 29 insertions, 21 deletions
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index cf855575c..48192cad1 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -379,6 +379,8 @@ ngx_http_auth_basic(ngx_conf_t *cf, void *post, void *data) if (ngx_strcmp(realm->data, "off") == 0) { realm->len = 0; realm->data = (u_char *) ""; + + return NGX_CONF_OK; } len = sizeof("Basic realm=\"") - 1 + realm->len + 1; diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 125b8e023..45b6e7382 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1419,7 +1419,8 @@ ngx_http_fastcgi_add_variables(ngx_conf_t *cf) { ngx_http_variable_t *var; - var = ngx_http_add_variable(cf, &ngx_http_fastcgi_script_name, 0); + var = ngx_http_add_variable(cf, &ngx_http_fastcgi_script_name, + NGX_HTTP_VAR_NOHASH); if (var == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 8231de11d..bf7b9251b 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -130,18 +130,14 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) var->handler = ngx_http_geo_variable; var->data = (uintptr_t) tree; - /* - * create the temporary pool of a huge initial size - * to process quickly a large number of geo lines - */ - - pool = ngx_create_pool(512 * 1024, cf->log); + pool = ngx_create_pool(16384, cf->log); if (pool == NULL) { return NGX_CONF_ERROR; } if (ngx_array_init(&geo.values, pool, 512, - sizeof(ngx_http_variable_value_t *)) == NGX_ERROR) + sizeof(ngx_http_variable_value_t *)) + == NGX_ERROR) { ngx_destroy_pool(pool); 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 66d59358a..e8197598f 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -961,7 +961,7 @@ ngx_http_gzip_add_variables(ngx_conf_t *cf) ngx_http_variable_t *var; ngx_http_log_op_name_t *op; - var = ngx_http_add_variable(cf, &ngx_http_gzip_ratio, 0); + var = ngx_http_add_variable(cf, &ngx_http_gzip_ratio, NGX_HTTP_VAR_NOHASH); if (var == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 8278d34e4..afadc18ce 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -359,20 +359,20 @@ static ngx_table_elt_t ngx_http_proxy_headers[] = { static ngx_http_variable_t ngx_http_proxy_vars[] = { { ngx_string("proxy_host"), ngx_http_proxy_host_variable, 0, - NGX_HTTP_VAR_CHANGABLE, 0 }, + NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 }, { ngx_string("proxy_port"), ngx_http_proxy_port_variable, 0, - NGX_HTTP_VAR_CHANGABLE, 0 }, + NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH, 0 }, { ngx_string("proxy_add_x_forwarded_for"), - ngx_http_proxy_add_x_forwarded_for_variable, 0, 0, 0 }, + ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 }, #if 0 - { ngx_string("proxy_add_via"), NULL, 0, 0, 0 }, + { ngx_string("proxy_add_via"), NULL, 0, NGX_HTTP_VAR_NOHASH, 0 }, #endif { ngx_string("proxy_internal_body_length"), - ngx_http_proxy_internal_body_length_variable, 0, 0, 0 }, + ngx_http_proxy_internal_body_length_variable, 0, NGX_HTTP_VAR_NOHASH, 0 }, { ngx_null_string, NULL, 0, 0, 0 } }; diff --git a/src/http/modules/ngx_http_referer_module.c b/src/http/modules/ngx_http_referer_module.c index a3d3d4606..cd8be7879 100644 --- a/src/http/modules/ngx_http_referer_module.c +++ b/src/http/modules/ngx_http_referer_module.c @@ -217,7 +217,8 @@ ngx_http_valid_referers(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) name.len = sizeof("invalid_referer") - 1; name.data = (u_char *) "invalid_referer"; - var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGABLE); + var = ngx_http_add_variable(cf, &name, + NGX_HTTP_VAR_CHANGABLE|NGX_HTTP_VAR_NOHASH); if (var == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index 6f4ac4555..dd0e92fcd 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -648,13 +648,17 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in) rc = cmd->handler(r, ctx, params); - if (c->closed) { + if (c->destroyed) { return NGX_DONE; } if (rc == NGX_OK) { continue; } + + if (rc == NGX_ERROR) { + return NGX_ERROR; + } } diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index 808d945ac..1504f241d 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -244,6 +244,12 @@ ngx_http_static_handler(ngx_http_request_t *r) return NGX_HTTP_INTERNAL_SERVER_ERROR; } + r->allow_ranges = 1; + + if (r->header_only || (r->main != r && ngx_file_size(&fi) == 0)) { + return ngx_http_send_header(r); + } + /* we need to allocate all before the header would be sent */ b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); @@ -256,11 +262,9 @@ ngx_http_static_handler(ngx_http_request_t *r) return NGX_HTTP_INTERNAL_SERVER_ERROR; } - r->allow_ranges = 1; - rc = ngx_http_send_header(r); - if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { + if (rc == NGX_ERROR || rc > NGX_OK) { return rc; } diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c index c77dca2da..159bd34c5 100644 --- a/src/http/modules/ngx_http_userid_filter_module.c +++ b/src/http/modules/ngx_http_userid_filter_module.c @@ -554,7 +554,7 @@ ngx_http_userid_add_variables(ngx_conf_t *cf) ngx_http_variable_t *var; ngx_http_log_op_name_t *op; - var = ngx_http_add_variable(cf, &ngx_http_userid_got, 0); + var = ngx_http_add_variable(cf, &ngx_http_userid_got, NGX_HTTP_VAR_NOHASH); if (var == NULL) { return NGX_ERROR; } @@ -562,7 +562,7 @@ ngx_http_userid_add_variables(ngx_conf_t *cf) var->handler = ngx_http_userid_variable; var->data = offsetof(ngx_http_userid_ctx_t, uid_got); - var = ngx_http_add_variable(cf, &ngx_http_userid_set, 0); + var = ngx_http_add_variable(cf, &ngx_http_userid_set, NGX_HTTP_VAR_NOHASH); if (var == NULL) { return NGX_ERROR; } |