Mercurial > hg > nginx-vendor-0-7
comparison src/http/ngx_http_upstream.c @ 50:72eb30262aac NGINX_0_1_25
nginx 0.1.25
*) Bugfix: nginx did run on Linux parisc.
*) Feature: nginx now does not start under FreeBSD if the sysctl
kern.ipc.somaxconn value is too big.
*) Bugfix: if a request was internally redirected by the
ngx_http_index_module module to the ngx_http_proxy_module or
ngx_http_fastcgi_module modules, then the index file was not closed
after request completion.
*) Feature: the "proxy_pass" can be used in location with regular
expression.
*) Feature: the ngx_http_rewrite_filter_module module supports the
condition like "if ($HTTP_USER_AGENT ~ MSIE)".
*) Bugfix: nginx started too slow if the large number of addresses and
text values were used in the "geo" directive.
*) Change: a variable name must be declared as "$name" in the "geo"
directive. The previous variant without "$" is still supported, but
will be removed soon.
*) Feature: the "%{VARIABLE}v" logging parameter.
*) Feature: the "set $name value" directive.
*) Bugfix: gcc 4.0 compatibility.
*) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Sat, 19 Mar 2005 00:00:00 +0300 |
parents | a39d1b793287 |
children | 0d75d65c642f |
comparison
equal
deleted
inserted
replaced
49:93dabbc9efb9 | 50:72eb30262aac |
---|---|
127 u->output.filter_ctx = &u->writer; | 127 u->output.filter_ctx = &u->writer; |
128 | 128 |
129 u->writer.pool = r->pool; | 129 u->writer.pool = r->pool; |
130 | 130 |
131 if (ngx_array_init(&u->states, r->pool, u->peer.peers->number, | 131 if (ngx_array_init(&u->states, r->pool, u->peer.peers->number, |
132 sizeof(ngx_http_upstream_state_t)) == NGX_ERROR) | 132 sizeof(ngx_http_upstream_state_t)) != NGX_OK) |
133 { | 133 { |
134 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 134 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
135 return; | 135 return; |
136 } | 136 } |
137 | 137 |
138 if (!(u->state = ngx_push_array(&u->states))) { | 138 u->state = ngx_array_push(&u->states); |
139 if (u->state == NULL) { | |
139 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 140 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
140 return; | 141 return; |
141 } | 142 } |
142 | 143 |
143 ngx_memzero(u->state, sizeof(ngx_http_upstream_state_t)); | 144 ngx_memzero(u->state, sizeof(ngx_http_upstream_state_t)); |
315 } | 316 } |
316 | 317 |
317 if (r->request_body->buf) { | 318 if (r->request_body->buf) { |
318 if (r->request_body->temp_file) { | 319 if (r->request_body->temp_file) { |
319 | 320 |
320 if (!(u->output.free = ngx_alloc_chain_link(r->pool))) { | 321 u->output.free = ngx_alloc_chain_link(r->pool); |
322 if (u->output.free == NULL) { | |
321 ngx_http_upstream_finalize_request(r, u, | 323 ngx_http_upstream_finalize_request(r, u, |
322 NGX_HTTP_INTERNAL_SERVER_ERROR); | 324 NGX_HTTP_INTERNAL_SERVER_ERROR); |
323 return; | 325 return; |
324 } | 326 } |
325 | 327 |
390 u->header_in.last = u->header_in.start; | 392 u->header_in.last = u->header_in.start; |
391 #endif | 393 #endif |
392 | 394 |
393 /* add one more state */ | 395 /* add one more state */ |
394 | 396 |
395 if (!(u->state = ngx_push_array(&u->states))) { | 397 u->state = ngx_array_push(&u->states); |
398 if (u->state == NULL) { | |
396 ngx_http_upstream_finalize_request(r, u, | 399 ngx_http_upstream_finalize_request(r, u, |
397 NGX_HTTP_INTERNAL_SERVER_ERROR); | 400 NGX_HTTP_INTERNAL_SERVER_ERROR); |
398 return; | 401 return; |
399 } | 402 } |
400 | 403 |
737 p->pool = r->pool; | 740 p->pool = r->pool; |
738 p->log = r->connection->log; | 741 p->log = r->connection->log; |
739 | 742 |
740 p->cachable = u->cachable; | 743 p->cachable = u->cachable; |
741 | 744 |
742 if (!(p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t)))) { | 745 p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t)); |
746 if (p->temp_file == NULL) { | |
743 ngx_http_upstream_finalize_request(r, u, 0); | 747 ngx_http_upstream_finalize_request(r, u, 0); |
744 return; | 748 return; |
745 } | 749 } |
746 | 750 |
747 p->temp_file->file.fd = NGX_INVALID_FILE; | 751 p->temp_file->file.fd = NGX_INVALID_FILE; |
757 } | 761 } |
758 | 762 |
759 p->max_temp_file_size = u->conf->max_temp_file_size; | 763 p->max_temp_file_size = u->conf->max_temp_file_size; |
760 p->temp_file_write_size = u->conf->temp_file_write_size; | 764 p->temp_file_write_size = u->conf->temp_file_write_size; |
761 | 765 |
762 if (!(p->preread_bufs = ngx_alloc_chain_link(r->pool))) { | 766 p->preread_bufs = ngx_alloc_chain_link(r->pool); |
767 if (p->preread_bufs == NULL) { | |
763 ngx_http_upstream_finalize_request(r, u, 0); | 768 ngx_http_upstream_finalize_request(r, u, 0); |
764 return; | 769 return; |
765 } | 770 } |
766 p->preread_bufs->buf = &u->header_in; | 771 p->preread_bufs->buf = &u->header_in; |
767 p->preread_bufs->next = NULL; | 772 p->preread_bufs->next = NULL; |