comparison src/http/ngx_http_core_module.c @ 570:8246d8a2c2be NGINX_0_8_37

nginx 0.8.37 *) Feature: the ngx_http_split_clients_module. *) Feature: the "map" directive supports keys more than 255 characters. *) Bugfix: nginx ignored the "private" and "no-store" values in the "Cache-Control" backend response header line. *) Bugfix: a "stub" parameter of an "include" SSI directive was not used, if empty response has 200 status code. *) Bugfix: if a proxied or FastCGI request was internally redirected to another proxied or FastCGI location, then a segmentation fault might occur in a worker process; the bug had appeared in 0.8.33. Thanks to Yichun Zhang. *) Bugfix: IMAP connections may hang until they timed out while talking to Zimbra server. Thanks to Alan Batie.
author Igor Sysoev <http://sysoev.ru>
date Mon, 17 May 2010 00:00:00 +0400
parents be4f34123024
children ff463db0be31
comparison
equal deleted inserted replaced
569:19b134bf21c0 570:8246d8a2c2be
1683 void 1683 void
1684 ngx_http_set_exten(ngx_http_request_t *r) 1684 ngx_http_set_exten(ngx_http_request_t *r)
1685 { 1685 {
1686 ngx_int_t i; 1686 ngx_int_t i;
1687 1687
1688 r->exten.len = 0; 1688 ngx_str_null(&r->exten);
1689 r->exten.data = NULL;
1690 1689
1691 for (i = r->uri.len - 1; i > 1; i--) { 1690 for (i = r->uri.len - 1; i > 1; i--) {
1692 if (r->uri.data[i] == '.' && r->uri.data[i - 1] != '/') { 1691 if (r->uri.data[i] == '.' && r->uri.data[i - 1] != '/') {
1693 1692
1694 r->exten.len = r->uri.len - i - 1; 1693 r->exten.len = r->uri.len - i - 1;
2185 2184
2186 if (args) { 2185 if (args) {
2187 r->args = *args; 2186 r->args = *args;
2188 2187
2189 } else { 2188 } else {
2190 r->args.len = 0; 2189 ngx_str_null(&r->args);
2191 r->args.data = NULL;
2192 } 2190 }
2193 2191
2194 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 2192 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
2195 "internal redirect: \"%V?%V\"", uri, &r->args); 2193 "internal redirect: \"%V?%V\"", uri, &r->args);
2196 2194
3030 conf->root = prev->root; 3028 conf->root = prev->root;
3031 conf->root_lengths = prev->root_lengths; 3029 conf->root_lengths = prev->root_lengths;
3032 conf->root_values = prev->root_values; 3030 conf->root_values = prev->root_values;
3033 3031
3034 if (prev->root.data == NULL) { 3032 if (prev->root.data == NULL) {
3035 conf->root.len = sizeof("html") - 1; 3033 ngx_str_set(&conf->root, "html");
3036 conf->root.data = (u_char *) "html";
3037 3034
3038 if (ngx_conf_full_name(cf->cycle, &conf->root, 0) != NGX_OK) { 3035 if (ngx_conf_full_name(cf->cycle, &conf->root, 0) != NGX_OK) {
3039 return NGX_CONF_ERROR; 3036 return NGX_CONF_ERROR;
3040 } 3037 }
3041 } 3038 }
3889 3886
3890 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) { 3887 if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
3891 return NGX_CONF_ERROR; 3888 return NGX_CONF_ERROR;
3892 } 3889 }
3893 3890
3894 args.len = 0; 3891 ngx_str_null(&args);
3895 args.data = NULL;
3896 3892
3897 if (cv.lengths == NULL && uri.data[0] == '/') { 3893 if (cv.lengths == NULL && uri.data[0] == '/') {
3898 p = (u_char *) ngx_strchr(uri.data, '?'); 3894 p = (u_char *) ngx_strchr(uri.data, '?');
3899 3895
3900 if (p) { 3896 if (p) {