Mercurial > hg > nginx-vendor-0-5
diff src/http/ngx_http_core_module.c @ 216:fa32d59d9a15 NGINX_0_3_55
nginx 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; bug appeared in
0.3.50.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 28 Jul 2006 00:00:00 +0400 |
parents | 0ad9eeb6ac7f |
children | 559bc7ec214e |
line wrap: on
line diff
--- 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_comm }; -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_reques 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_reques 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 * 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_c 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);