Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 667:63a820b0bc6c release-0.3.55
nginx-0.3.55-RELEASE import
*) 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.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 28 Jul 2006 15:16:17 +0000 |
parents | 5fd7a5e99047 |
children | cec32b3753ac |
comparison
equal
deleted
inserted
replaced
666:ddaa33b0817a | 667:63a820b0bc6c |
---|---|
424 | 424 |
425 ngx_null_command | 425 ngx_null_command |
426 }; | 426 }; |
427 | 427 |
428 | 428 |
429 ngx_http_module_t ngx_http_core_module_ctx = { | 429 static ngx_http_module_t ngx_http_core_module_ctx = { |
430 ngx_http_core_preconfiguration, /* preconfiguration */ | 430 ngx_http_core_preconfiguration, /* preconfiguration */ |
431 NULL, /* postconfiguration */ | 431 NULL, /* postconfiguration */ |
432 | 432 |
433 ngx_http_core_create_main_conf, /* create main configuration */ | 433 ngx_http_core_create_main_conf, /* create main configuration */ |
434 ngx_http_core_init_main_conf, /* init main configuration */ | 434 ngx_http_core_init_main_conf, /* init main configuration */ |
1069 } | 1069 } |
1070 | 1070 |
1071 last = ngx_copy(path->data, clcf->root.data, clcf->root.len); | 1071 last = ngx_copy(path->data, clcf->root.data, clcf->root.len); |
1072 | 1072 |
1073 } else { | 1073 } else { |
1074 last = ngx_http_script_run(r, path, clcf->root_lengths->elts, reserved, | 1074 if (ngx_http_script_run(r, path, clcf->root_lengths->elts, reserved, |
1075 clcf->root_values->elts); | 1075 clcf->root_values->elts) |
1076 if (last == NULL) { | 1076 == NULL) |
1077 { | |
1077 return NULL; | 1078 return NULL; |
1078 } | 1079 } |
1079 | 1080 |
1081 if (ngx_conf_full_name((ngx_cycle_t *) ngx_cycle, path) == NGX_ERROR) { | |
1082 return NULL; | |
1083 } | |
1084 | |
1080 r->root_length = path->len - reserved; | 1085 r->root_length = path->len - reserved; |
1086 last = path->data + r->root_length; | |
1081 } | 1087 } |
1082 | 1088 |
1083 last = ngx_cpystrn(last, r->uri.data + alias, r->uri.len - alias + 1); | 1089 last = ngx_cpystrn(last, r->uri.data + alias, r->uri.len - alias + 1); |
1084 | 1090 |
1085 return last; | 1091 return last; |
1156 } | 1162 } |
1157 | 1163 |
1158 | 1164 |
1159 ngx_int_t | 1165 ngx_int_t |
1160 ngx_http_subrequest(ngx_http_request_t *r, | 1166 ngx_http_subrequest(ngx_http_request_t *r, |
1161 ngx_str_t *uri, ngx_str_t *args, ngx_uint_t flags) | 1167 ngx_str_t *uri, ngx_str_t *args, ngx_chain_t *out, ngx_uint_t flags) |
1162 { | 1168 { |
1163 ngx_connection_t *c; | 1169 ngx_connection_t *c; |
1164 ngx_http_request_t *sr; | 1170 ngx_http_request_t *sr; |
1165 ngx_http_log_ctx_t *ctx; | 1171 ngx_http_log_ctx_t *ctx; |
1166 ngx_http_core_srv_conf_t *cscf; | 1172 ngx_http_core_srv_conf_t *cscf; |
1237 | 1243 |
1238 if (ngx_http_set_exten(sr) != NGX_OK) { | 1244 if (ngx_http_set_exten(sr) != NGX_OK) { |
1239 return NGX_ERROR; | 1245 return NGX_ERROR; |
1240 } | 1246 } |
1241 | 1247 |
1248 sr->out = out; | |
1242 sr->main = r->main; | 1249 sr->main = r->main; |
1243 sr->parent = r; | 1250 sr->parent = r; |
1244 sr->read_event_handler = ngx_http_request_empty_handler; | 1251 sr->read_event_handler = ngx_http_request_empty_handler; |
1245 sr->write_event_handler = ngx_http_request_empty_handler; | 1252 sr->write_event_handler = ngx_http_request_empty_handler; |
1246 | 1253 |
2525 | 2532 |
2526 if (!alias && lcf->root.data[lcf->root.len - 1] == '/') { | 2533 if (!alias && lcf->root.data[lcf->root.len - 1] == '/') { |
2527 lcf->root.len--; | 2534 lcf->root.len--; |
2528 } | 2535 } |
2529 | 2536 |
2530 if (ngx_conf_full_name(cf->cycle, &lcf->root) == NGX_ERROR) { | 2537 if (lcf->root.data[0] != '$') { |
2531 return NGX_CONF_ERROR; | 2538 if (ngx_conf_full_name(cf->cycle, &lcf->root) == NGX_ERROR) { |
2539 return NGX_CONF_ERROR; | |
2540 } | |
2532 } | 2541 } |
2533 | 2542 |
2534 n = ngx_http_script_variables_count(&lcf->root); | 2543 n = ngx_http_script_variables_count(&lcf->root); |
2535 | 2544 |
2536 if (n == 0) { | 2545 if (n == 0) { |