comparison src/http/ngx_http_request.c @ 2049:2a92804f4109

*) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jun 2008 15:00:30 +0000
parents e720be7bc195
children 5657037448d1
comparison
equal deleted inserted replaced
2048:824615f3b4ec 2049:2a92804f4109
652 } 652 }
653 653
654 654
655 if (r->complex_uri || r->quoted_uri) { 655 if (r->complex_uri || r->quoted_uri) {
656 656
657 r->uri.data = ngx_palloc(r->pool, r->uri.len + 1); 657 r->uri.data = ngx_pnalloc(r->pool, r->uri.len + 1);
658 if (r->uri.data == NULL) { 658 if (r->uri.data == NULL) {
659 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 659 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
660 return; 660 return;
661 } 661 }
662 662
912 912
913 h->value.len = r->header_end - r->header_start; 913 h->value.len = r->header_end - r->header_start;
914 h->value.data = r->header_start; 914 h->value.data = r->header_start;
915 h->value.data[h->value.len] = '\0'; 915 h->value.data[h->value.len] = '\0';
916 916
917 h->lowcase_key = ngx_palloc(r->pool, h->key.len); 917 h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
918 if (h->lowcase_key == NULL) { 918 if (h->lowcase_key == NULL) {
919 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 919 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
920 return; 920 return;
921 } 921 }
922 922
1560 1560
1561 if (len <= 32) { 1561 if (len <= 32) {
1562 server = buf; 1562 server = buf;
1563 1563
1564 } else { 1564 } else {
1565 server = ngx_palloc(r->pool, len); 1565 server = ngx_pnalloc(r->pool, len);
1566 if (server == NULL) { 1566 if (server == NULL) {
1567 return NGX_ERROR; 1567 return NGX_ERROR;
1568 } 1568 }
1569 } 1569 }
1570 1570