diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-07-28 15:16:17 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-07-28 15:16:17 +0000 |
commit | 8f1255877c4b64f83fce75baa4d903797e00e815 (patch) | |
tree | e6594c2c4578b85fa81c4a5fe334daac91142a6f /src/http/ngx_http_core_module.c | |
parent | 741c6e9c1ecd17d2165f2e8e3426023117f4b15d (diff) | |
download | nginx-8f1255877c4b64f83fce75baa4d903797e00e815.tar.gz nginx-8f1255877c4b64f83fce75baa4d903797e00e815.zip |
nginx-0.3.55-RELEASE importrelease-0.3.55
*) Feature: the "stub" parameter in the "include" SSI command.
*) Feature: the "block" SSI command.
*) Feature: the unicode2nginx script was added to contrib.
*) Bugfix: if a "root" was specified by variable only, then the root
was relative to a server prefix.
*) Bugfix: if the request contained "//" or "/./" and escaped symbols
after them, then the proxied request was sent unescaped.
*) Bugfix: the $r->headers_in("Cookie") of the ngx_http_perl_module now
returns all "Cookie" header lines.
*) Bugfix: a segmentation fault occurred if
"client_body_in_file_only on" was used and nginx switched to a next
upstream.
*) Bugfix: on some condition while reconfiguration character codes
inside the "charset_map" may be treated invalid; the bug had
appeared in 0.3.50.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index ee0d3ca92..eb4934e8e 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -426,7 +426,7 @@ static ngx_command_t ngx_http_core_commands[] = { }; -ngx_http_module_t ngx_http_core_module_ctx = { +static ngx_http_module_t ngx_http_core_module_ctx = { ngx_http_core_preconfiguration, /* preconfiguration */ NULL, /* postconfiguration */ @@ -1071,13 +1071,19 @@ ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *path, last = ngx_copy(path->data, clcf->root.data, clcf->root.len); } else { - last = ngx_http_script_run(r, path, clcf->root_lengths->elts, reserved, - clcf->root_values->elts); - if (last == NULL) { + if (ngx_http_script_run(r, path, clcf->root_lengths->elts, reserved, + clcf->root_values->elts) + == NULL) + { + return NULL; + } + + if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, path) == NGX_ERROR) { return NULL; } r->root_length = path->len - reserved; + last = path->data + r->root_length; } last = ngx_cpystrn(last, r->uri.data + alias, r->uri.len - alias + 1); @@ -1158,7 +1164,7 @@ ngx_http_auth_basic_user(ngx_http_request_t *r) ngx_int_t ngx_http_subrequest(ngx_http_request_t *r, - ngx_str_t *uri, ngx_str_t *args, ngx_uint_t flags) + ngx_str_t *uri, ngx_str_t *args, ngx_chain_t *out, ngx_uint_t flags) { ngx_connection_t *c; ngx_http_request_t *sr; @@ -1239,6 +1245,7 @@ ngx_http_subrequest(ngx_http_request_t *r, return NGX_ERROR; } + sr->out = out; sr->main = r->main; sr->parent = r; sr->read_event_handler = ngx_http_request_empty_handler; @@ -2527,8 +2534,10 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) lcf->root.len--; } - if (ngx_conf_full_name(cf->cycle, &lcf->root) == NGX_ERROR) { - return NGX_CONF_ERROR; + if (lcf->root.data[0] != '$') { + if (ngx_conf_full_name(cf->cycle, &lcf->root) == NGX_ERROR) { + return NGX_CONF_ERROR; + } } n = ngx_http_script_variables_count(&lcf->root); |