Mercurial > hg > nginx-vendor-0-8
diff src/http/ngx_http_request.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 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -232,9 +232,6 @@ ngx_http_init_request(ngx_event_t *rev) ngx_http_core_srv_conf_t *cscf; ngx_http_core_loc_conf_t *clcf; ngx_http_core_main_conf_t *cmcf; -#if (NGX_HTTP_SSL) - ngx_http_ssl_srv_conf_t *sscf; -#endif #if (NGX_STAT_STUB) ngx_atomic_fetch_add(ngx_stat_reading, -1); @@ -354,6 +351,9 @@ ngx_http_init_request(ngx_event_t *rev) #if (NGX_HTTP_SSL) + { + ngx_http_ssl_srv_conf_t *sscf; + sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); if (sscf->enable) { @@ -370,6 +370,7 @@ ngx_http_init_request(ngx_event_t *rev) r->main_filter_need_in_memory = 1; } + } #endif @@ -1398,11 +1399,7 @@ ngx_http_process_request_header(ngx_http static void ngx_http_process_request(ngx_http_request_t *r) { - ngx_connection_t *c; -#if (NGX_HTTP_SSL) - long rc; - ngx_http_ssl_srv_conf_t *sscf; -#endif + ngx_connection_t *c; c = r->connection; @@ -1416,6 +1413,9 @@ ngx_http_process_request(ngx_http_reques #if (NGX_HTTP_SSL) if (c->ssl) { + long rc; + ngx_http_ssl_srv_conf_t *sscf; + sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); if (sscf->verify) { @@ -1469,12 +1469,6 @@ ngx_http_find_virtual_server(ngx_http_re { ngx_http_core_loc_conf_t *clcf; ngx_http_core_srv_conf_t *cscf; -#if (NGX_PCRE) - ngx_int_t n; - ngx_uint_t i; - ngx_str_t name; - ngx_http_server_name_t *sn; -#endif cscf = ngx_hash_find_combined(&r->virtual_names->names, hash, host, len); @@ -1485,6 +1479,10 @@ ngx_http_find_virtual_server(ngx_http_re #if (NGX_PCRE) if (r->virtual_names->nregex) { + ngx_int_t n; + ngx_uint_t i; + ngx_str_t name; + ngx_http_server_name_t *sn; name.len = len; name.data = host; @@ -2095,7 +2093,7 @@ ngx_http_set_keepalive(ngx_http_request_ if (hc->free) { for (i = 0; i < hc->nfree; i++) { - ngx_pfree(c->pool, hc->free[i]); + ngx_pfree(c->pool, hc->free[i]->start); hc->free[i] = NULL; } @@ -2107,7 +2105,7 @@ ngx_http_set_keepalive(ngx_http_request_ if (hc->busy) { for (i = 0; i < hc->nbusy; i++) { - ngx_pfree(c->pool, hc->busy[i]); + ngx_pfree(c->pool, hc->busy[i]->start); hc->busy[i] = NULL; }