Mercurial > hg > nginx-vendor-0-8
comparison src/http/ngx_http_request.c @ 496:f39b9e29530d NGINX_0_8_0
nginx 0.8.0
*) Feature: the "keepalive_requests" directive.
*) Feature: the "limit_rate_after" directive.
Thanks to Ivan Debnar.
*) Bugfix: XLST filter did not work in subrequests.
*) Bugfix: in relative paths handling in nginx/Windows.
*) Bugfix: in proxy_store, fastcgi_store, proxy_cache, and
fastcgi_cache in nginx/Windows.
*) Bugfix: in memory allocation error handling.
Thanks to Maxim Dounin and Kirill A. Korinskiy.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 02 Jun 2009 00:00:00 +0400 |
parents | 499474178a11 |
children | f0cac61857ae |
comparison
equal
deleted
inserted
replaced
495:6d9fb4461113 | 496:f39b9e29530d |
---|---|
257 | 257 |
258 ngx_http_close_connection(c); | 258 ngx_http_close_connection(c); |
259 return; | 259 return; |
260 } | 260 } |
261 | 261 |
262 c->requests++; | |
263 | |
262 hc = c->data; | 264 hc = c->data; |
263 | 265 |
264 if (hc == NULL) { | 266 if (hc == NULL) { |
265 hc = ngx_pcalloc(c->pool, sizeof(ngx_http_connection_t)); | 267 hc = ngx_pcalloc(c->pool, sizeof(ngx_http_connection_t)); |
266 if (hc == NULL) { | 268 if (hc == NULL) { |
447 | 449 |
448 if (ngx_list_init(&r->headers_out.headers, r->pool, 20, | 450 if (ngx_list_init(&r->headers_out.headers, r->pool, 20, |
449 sizeof(ngx_table_elt_t)) | 451 sizeof(ngx_table_elt_t)) |
450 != NGX_OK) | 452 != NGX_OK) |
451 { | 453 { |
452 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 454 ngx_destroy_pool(r->pool); |
455 ngx_http_close_connection(c); | |
453 return; | 456 return; |
454 } | 457 } |
455 | 458 |
456 r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); | 459 r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); |
457 if (r->ctx == NULL) { | 460 if (r->ctx == NULL) { |
458 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 461 ngx_destroy_pool(r->pool); |
462 ngx_http_close_connection(c); | |
459 return; | 463 return; |
460 } | 464 } |
461 | 465 |
462 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); | 466 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); |
463 | 467 |
464 r->variables = ngx_pcalloc(r->pool, cmcf->variables.nelts | 468 r->variables = ngx_pcalloc(r->pool, cmcf->variables.nelts |
465 * sizeof(ngx_http_variable_value_t)); | 469 * sizeof(ngx_http_variable_value_t)); |
466 if (r->variables == NULL) { | 470 if (r->variables == NULL) { |
467 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 471 ngx_destroy_pool(r->pool); |
472 ngx_http_close_connection(c); | |
468 return; | 473 return; |
469 } | 474 } |
470 | 475 |
471 c->single_connection = 1; | 476 c->single_connection = 1; |
472 c->destroyed = 0; | 477 c->destroyed = 0; |