Mercurial > hg > nginx-vendor-0-5
comparison src/http/ngx_http_upstream.c @ 258:6ae1357b7b7c NGINX_0_4_14
nginx 0.4.14
*) Feature: the "proxy_pass_error_message" directive in IMAP/POP3 proxy.
*) Feature: now configure detects system PCRE library on FreeBSD,
Linux, and NetBSD.
*) Bugfix: ngx_http_perl_module did not work with perl built with the
threads support; bug appeared in 0.3.38.
*) Bugfix: ngx_http_perl_module did not work if perl was called
recursively.
*) Bugfix: nginx ignored a host name in an request line.
*) Bugfix: a worker process may got caught in an endless loop, if a
FastCGI server sent too many data to the stderr.
*) Bugfix: the $upstream_response_time variable may be negative if the
system time was changed backward.
*) Bugfix: the "Auth-Login-Attempt" parameter was not sent to IMAP/POP3
proxy authentication server when POP3 was used.
*) Bugfix: a segmentation fault might occur if connect to IMAP/POP3
proxy authentication server failed.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 27 Nov 2006 00:00:00 +0300 |
parents | fbf2b2f66c9f |
children | 0effe91f6083 |
comparison
equal
deleted
inserted
replaced
257:0e566ee1bcd5 | 258:6ae1357b7b7c |
---|---|
510 static void | 510 static void |
511 ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) | 511 ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) |
512 { | 512 { |
513 ngx_int_t rc; | 513 ngx_int_t rc; |
514 ngx_time_t *tp; | 514 ngx_time_t *tp; |
515 ngx_msec_int_t ms; | |
515 ngx_connection_t *c; | 516 ngx_connection_t *c; |
516 | 517 |
517 r->connection->log->action = "connecting to upstream"; | 518 r->connection->log->action = "connecting to upstream"; |
518 | 519 |
519 r->connection->single_connection = 0; | 520 r->connection->single_connection = 0; |
520 | 521 |
521 if (u->state && u->state->response_time) { | 522 if (u->state && u->state->response_time) { |
522 tp = ngx_timeofday(); | 523 tp = ngx_timeofday(); |
523 u->state->response_time = tp->sec * 1000 + tp->msec | 524 ms = tp->sec * 1000 + tp->msec - u->state->response_time; |
524 - u->state->response_time; | 525 u->state->response_time = (ms >= 0) ? ms : 0; |
525 } | 526 } |
526 | 527 |
527 u->state = ngx_array_push(&u->states); | 528 u->state = ngx_array_push(&u->states); |
528 if (u->state == NULL) { | 529 if (u->state == NULL) { |
529 ngx_http_upstream_finalize_request(r, u, | 530 ngx_http_upstream_finalize_request(r, u, |
2055 | 2056 |
2056 static void | 2057 static void |
2057 ngx_http_upstream_finalize_request(ngx_http_request_t *r, | 2058 ngx_http_upstream_finalize_request(ngx_http_request_t *r, |
2058 ngx_http_upstream_t *u, ngx_int_t rc) | 2059 ngx_http_upstream_t *u, ngx_int_t rc) |
2059 { | 2060 { |
2060 ngx_time_t *tp; | 2061 ngx_time_t *tp; |
2062 ngx_msec_int_t ms; | |
2061 | 2063 |
2062 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 2064 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
2063 "finalize http upstream request: %i", rc); | 2065 "finalize http upstream request: %i", rc); |
2064 | 2066 |
2065 *u->cleanup = NULL; | 2067 *u->cleanup = NULL; |
2066 | 2068 |
2067 if (u->state->response_time) { | 2069 if (u->state->response_time) { |
2068 tp = ngx_timeofday(); | 2070 tp = ngx_timeofday(); |
2069 u->state->response_time = tp->sec * 1000 + tp->msec | 2071 ms = tp->sec * 1000 + tp->msec - u->state->response_time; |
2070 - u->state->response_time; | 2072 u->state->response_time = (ms >= 0) ? ms : 0; |
2071 } | 2073 } |
2072 | 2074 |
2073 u->finalize_request(r, rc); | 2075 u->finalize_request(r, rc); |
2074 | 2076 |
2075 if (u->peer.connection) { | 2077 if (u->peer.connection) { |