# HG changeset patch # User Igor Sysoev # Date 1160683200 -14400 # Node ID acd2ec3541cb95a694fe69b020f0a8b10d167ecb # Parent fcca101509a410a343af1de3124767f7f89b05a0 nginx 0.4.9 *) Feature: the "set" parameter in the "include" SSI command. *) Feature: the ngx_http_perl_module now tests the nginx.pm module version. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,12 @@ +Changes with nginx 0.4.9 13 Oct 2006 + + *) Feature: the "set" parameter in the "include" SSI command. + + *) Feature: the ngx_http_perl_module now tests the nginx.pm module + version. + + Changes with nginx 0.4.8 11 Oct 2006 *) Bugfix: if an "include" SSI command were before another "include" diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,12 @@ +Изменения в nginx 0.4.9 13.10.2006 + + *) Добавление: параметр set в команде SSI include. + + *) Добавление: модуль ngx_http_perl_module теперь проверяет версию + модуля nginx.pm. + + Изменения в nginx 0.4.8 11.10.2006 *) Исправление: если до команды SSI include с параметром wait diff --git a/README b/README --- a/README +++ b/README @@ -1,3 +1,4 @@ -Documentation is available at http://sysoev.ru/nginx/ only. +The Russian documentation is available at http://sysoev.ru/nginx/ +The English documentation is available at http://nginx.net diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,8 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.4.8" +#define NGINX_VERSION "0.4.9" +#define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" #define NGX_OLDPID_EXT ".oldbin" diff --git a/src/core/ngx_crc.h b/src/core/ngx_crc.h --- a/src/core/ngx_crc.h +++ b/src/core/ngx_crc.h @@ -10,15 +10,16 @@ /* 32-bit crc16 */ -static ngx_inline uint32_t ngx_crc(char *data, size_t len) +static ngx_inline uint32_t +ngx_crc(char *data, size_t len) { uint32_t sum; for (sum = 0; len; len--) { /* - * gcc 2.95.2 x86 and icc 7.1.006 compile that operator - * into the single "rol" opcode. + * gcc 2.95.2 x86 and icc 7.1.006 compile + * that operator into the single "rol" opcode, * msvc 6.0sp2 compiles it into four opcodes. */ sum = sum >> 1 | sum << 31; diff --git a/src/http/modules/ngx_http_addition_filter_module.c b/src/http/modules/ngx_http_addition_filter_module.c --- a/src/http/modules/ngx_http_addition_filter_module.c +++ b/src/http/modules/ngx_http_addition_filter_module.c @@ -144,10 +144,10 @@ ngx_http_addition_body_filter(ngx_http_r ctx->before_body_sent = 1; if (conf->before_body.len) { - if (ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } } } @@ -168,10 +168,10 @@ ngx_http_addition_body_filter(ngx_http_r return rc; } - if (ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module); diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -135,7 +135,7 @@ ngx_http_autoindex_handler(ngx_http_requ { u_char *last, *filename, scale; off_t length; - size_t len, copy, allocated; + size_t len, copy, allocated, root; ngx_tm_t tm; ngx_err_t err; ngx_buf_t *b; @@ -174,7 +174,8 @@ ngx_http_autoindex_handler(ngx_http_requ /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */ - last = ngx_http_map_uri_to_path(r, &path, NGX_HTTP_AUTOINDEX_PREALLOCATE); + last = ngx_http_map_uri_to_path(r, &path, &root, + NGX_HTTP_AUTOINDEX_PREALLOCATE); if (last == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -102,6 +102,7 @@ static ngx_int_t ngx_http_dav_handler(ngx_http_request_t *r) { char *failed; + size_t root; ngx_int_t rc; ngx_str_t path; ngx_file_info_t fi; @@ -152,7 +153,7 @@ ngx_http_dav_handler(ngx_http_request_t return rc; } - ngx_http_map_uri_to_path(r, &path, 0); + ngx_http_map_uri_to_path(r, &path, &root, 0); ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http delete filename: \"%s\"", path.data); @@ -219,7 +220,7 @@ ngx_http_dav_handler(ngx_http_request_t return rc; } - ngx_http_map_uri_to_path(r, &path, 0); + ngx_http_map_uri_to_path(r, &path, &root, 0); ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http mkcol path: \"%s\"", path.data); @@ -245,6 +246,7 @@ ngx_http_dav_put_handler(ngx_http_reques { char *failed; u_char *name; + size_t root; time_t date; ngx_err_t err; ngx_str_t *temp, path; @@ -252,7 +254,7 @@ ngx_http_dav_put_handler(ngx_http_reques ngx_file_info_t fi; ngx_http_dav_loc_conf_t *dlcf; - ngx_http_map_uri_to_path(r, &path, 0); + ngx_http_map_uri_to_path(r, &path, &root, 0); ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http put filename: \"%s\"", path.data); diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -395,6 +395,13 @@ ngx_http_fastcgi_handler(ngx_http_reques ngx_http_upstream_t *u; ngx_http_fastcgi_loc_conf_t *flcf; + if (r->subrequest_in_memory) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "ngx_http_fastcgi_module does not support " + "subrequest in memeory"); + return NGX_HTTP_INTERNAL_SERVER_ERROR; + } + flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module); u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t)); diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c --- a/src/http/modules/ngx_http_flv_module.c +++ b/src/http/modules/ngx_http_flv_module.c @@ -62,6 +62,7 @@ ngx_http_flv_handler(ngx_http_request_t { u_char *p; off_t start, len; + size_t root; ngx_fd_t fd; ngx_int_t rc; ngx_uint_t level, i; @@ -94,7 +95,7 @@ ngx_http_flv_handler(ngx_http_request_t return rc; } - if (ngx_http_map_uri_to_path(r, &path, 0) == NULL) { + if (ngx_http_map_uri_to_path(r, &path, &root, 0) == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c --- a/src/http/modules/ngx_http_index_module.c +++ b/src/http/modules/ngx_http_index_module.c @@ -28,6 +28,8 @@ typedef struct { ngx_str_t path; ngx_str_t index; + size_t root; + ngx_uint_t tested; /* unsigned tested:1 */ } ngx_http_index_ctx_t; @@ -200,7 +202,7 @@ ngx_http_index_handler(ngx_http_request_ if (len > (size_t) (ctx->path.data + ctx->path.len - ctx->index.data)) { - last = ngx_http_map_uri_to_path(r, &ctx->path, len); + last = ngx_http_map_uri_to_path(r, &ctx->path, &ctx->root, len); if (last == NULL) { return NGX_ERROR; } @@ -291,7 +293,7 @@ ngx_http_index_handler(ngx_http_request_ uri.len = r->uri.len + ctx->index.len - 1; if (!clcf->alias) { - uri.data = ctx->path.data + r->root_length; + uri.data = ctx->path.data + ctx->root; } else { uri.data = ngx_palloc(r->pool, uri.len); diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -78,6 +78,10 @@ static ngx_int_t ngx_http_ssi_evaluate_s static ngx_int_t ngx_http_ssi_include(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); +static ngx_int_t ngx_http_ssi_stub_output(ngx_http_request_t *r, void *data, + ngx_int_t rc); +static ngx_int_t ngx_http_ssi_set_variable(ngx_http_request_t *r, void *data, + ngx_int_t rc); static ngx_int_t ngx_http_ssi_echo(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); static ngx_int_t ngx_http_ssi_config(ngx_http_request_t *r, @@ -197,11 +201,14 @@ static ngx_http_output_body_filter_pt static u_char ngx_http_ssi_string[] = "