comparison src/http/ngx_http_core_module.c @ 356:b743d290eb3b NGINX_0_6_22

nginx 0.6.22 *) Change: now all ngx_http_perl_module methods return values copied to perl's allocated memory. *) Bugfix: if nginx was built with ngx_http_perl_module, the perl before 5.8.6 was used, and perl supported threads, then during reconfiguration the master process aborted; bug appeared in 0.5.9. Thanks to Boris Zhmurov. *) Bugfix: the ngx_http_perl_module methods may get invalid values of the regex captures. *) Bugfix: a segmentation fault occurred in worker process, if the $r->has_request_body() method was called for a request whose small request body was already received. *) Bugfix: large_client_header_buffers did not freed before going to keep-alive state. Thanks to Olexander Shtepa. *) Bugfix: the last address was missed in the $upstream_addr variable; bug appeared in 0.6.18. *) Bugfix: the "fastcgi_catch_stderr" directive did return error code; now it returns 502 code, that can be rerouted to a next server using the "fastcgi_next_upstream invalid_header" directive. *) Bugfix: a segmentation fault occurred in master process if the "fastcgi_catch_stderr" directive was used; bug appeared in 0.6.10. Thanks to Manlio Perillo.
author Igor Sysoev <http://sysoev.ru>
date Wed, 19 Dec 2007 00:00:00 +0300
parents 583decdb82a4
children 9121a0a91f47
comparison
equal deleted inserted replaced
355:3ac45897a61c 356:b743d290eb3b
1801 ngx_conf_t save; 1801 ngx_conf_t save;
1802 ngx_http_module_t *module; 1802 ngx_http_module_t *module;
1803 ngx_http_conf_ctx_t *ctx, *pctx; 1803 ngx_http_conf_ctx_t *ctx, *pctx;
1804 ngx_http_core_srv_conf_t *cscf; 1804 ngx_http_core_srv_conf_t *cscf;
1805 ngx_http_core_loc_conf_t *clcf, *pclcf, **clcfp; 1805 ngx_http_core_loc_conf_t *clcf, *pclcf, **clcfp;
1806 #if (NGX_PCRE)
1807 ngx_str_t err;
1808 u_char errstr[NGX_MAX_CONF_ERRSTR];
1809 #endif
1810 1806
1811 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)); 1807 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
1812 if (ctx == NULL) { 1808 if (ctx == NULL) {
1813 return NGX_CONF_ERROR; 1809 return NGX_CONF_ERROR;
1814 } 1810 }
1859 || (value[1].len == 2 1855 || (value[1].len == 2
1860 && value[1].data[0] == '~' 1856 && value[1].data[0] == '~'
1861 && value[1].data[1] == '*')) 1857 && value[1].data[1] == '*'))
1862 { 1858 {
1863 #if (NGX_PCRE) 1859 #if (NGX_PCRE)
1860 ngx_str_t err;
1861 u_char errstr[NGX_MAX_CONF_ERRSTR];
1862
1864 err.len = NGX_MAX_CONF_ERRSTR; 1863 err.len = NGX_MAX_CONF_ERRSTR;
1865 err.data = errstr; 1864 err.data = errstr;
1866 1865
1867 clcf->regex = ngx_regex_compile(&value[2], 1866 clcf->regex = ngx_regex_compile(&value[2],
1868 value[1].len == 2 ? NGX_REGEX_CASELESS: 0, 1867 value[1].len == 2 ? NGX_REGEX_CASELESS: 0,
2801 2800
2802 u_char ch; 2801 u_char ch;
2803 ngx_str_t *value, name; 2802 ngx_str_t *value, name;
2804 ngx_uint_t i; 2803 ngx_uint_t i;
2805 ngx_http_server_name_t *sn; 2804 ngx_http_server_name_t *sn;
2806 #if (NGX_PCRE)
2807 ngx_str_t err;
2808 u_char errstr[NGX_MAX_CONF_ERRSTR];
2809 #endif
2810 2805
2811 value = cf->args->elts; 2806 value = cf->args->elts;
2812 2807
2813 ch = value[1].data[0]; 2808 ch = value[1].data[0];
2814 2809
2880 if (value[i].data[0] != '~') { 2875 if (value[i].data[0] != '~') {
2881 continue; 2876 continue;
2882 } 2877 }
2883 2878
2884 #if (NGX_PCRE) 2879 #if (NGX_PCRE)
2880 {
2881 ngx_str_t err;
2882 u_char errstr[NGX_MAX_CONF_ERRSTR];
2883
2885 err.len = NGX_MAX_CONF_ERRSTR; 2884 err.len = NGX_MAX_CONF_ERRSTR;
2886 err.data = errstr; 2885 err.data = errstr;
2887 2886
2888 value[i].len--; 2887 value[i].len--;
2889 value[i].data++; 2888 value[i].data++;
2896 return NGX_CONF_ERROR; 2895 return NGX_CONF_ERROR;
2897 } 2896 }
2898 2897
2899 sn->name.len = value[i].len; 2898 sn->name.len = value[i].len;
2900 sn->name.data = value[i].data; 2899 sn->name.data = value[i].data;
2901 2900 }
2902 #else 2901 #else
2903 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 2902 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
2904 "the using of the regex \"%V\" " 2903 "the using of the regex \"%V\" "
2905 "requires PCRE library", &value[i]); 2904 "requires PCRE library", &value[i]);
2906 2905