diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-03-19 12:38:37 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-03-19 12:38:37 +0000 |
commit | c15717285d2157a603bb1b130b26d7baa549be7e (patch) | |
tree | 56dc8346b22bb2660eecd3bc086d263ac6d67326 /src/http/ngx_http_upstream.c | |
parent | e12fbfe82a176cd386cdcecfeabf43ac8fd870a4 (diff) | |
download | nginx-release-0.1.25.tar.gz nginx-release-0.1.25.zip |
nginx-0.1.25-RELEASE importrelease-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.
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 5b8312130..3076df7de 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -129,13 +129,14 @@ ngx_http_upstream_init(ngx_http_request_t *r) u->writer.pool = r->pool; if (ngx_array_init(&u->states, r->pool, u->peer.peers->number, - sizeof(ngx_http_upstream_state_t)) == NGX_ERROR) + sizeof(ngx_http_upstream_state_t)) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); return; } - if (!(u->state = ngx_push_array(&u->states))) { + u->state = ngx_array_push(&u->states); + if (u->state == NULL) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); return; } @@ -317,7 +318,8 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) if (r->request_body->buf) { if (r->request_body->temp_file) { - if (!(u->output.free = ngx_alloc_chain_link(r->pool))) { + u->output.free = ngx_alloc_chain_link(r->pool); + if (u->output.free == NULL) { ngx_http_upstream_finalize_request(r, u, NGX_HTTP_INTERNAL_SERVER_ERROR); return; @@ -392,7 +394,8 @@ ngx_http_upstream_reinit(ngx_http_request_t *r, ngx_http_upstream_t *u) /* add one more state */ - if (!(u->state = ngx_push_array(&u->states))) { + u->state = ngx_array_push(&u->states); + if (u->state == NULL) { ngx_http_upstream_finalize_request(r, u, NGX_HTTP_INTERNAL_SERVER_ERROR); return; @@ -739,7 +742,8 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) p->cachable = u->cachable; - if (!(p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t)))) { + p->temp_file = ngx_pcalloc(r->pool, sizeof(ngx_temp_file_t)); + if (p->temp_file == NULL) { ngx_http_upstream_finalize_request(r, u, 0); return; } @@ -759,7 +763,8 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u) p->max_temp_file_size = u->conf->max_temp_file_size; p->temp_file_write_size = u->conf->temp_file_write_size; - if (!(p->preread_bufs = ngx_alloc_chain_link(r->pool))) { + p->preread_bufs = ngx_alloc_chain_link(r->pool); + if (p->preread_bufs == NULL) { ngx_http_upstream_finalize_request(r, u, 0); return; } |