Mercurial > hg > nginx
changeset 80:939bc7cd9a90
nginx-0.0.1-2003-04-23-18:34:42 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 23 Apr 2003 14:34:42 +0000 |
parents | eacfdd1c31b9 |
children | b2ece31c976a |
files | src/http/modules/proxy/ngx_http_event_proxy_handler.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/proxy/ngx_http_event_proxy_handler.c +++ b/src/http/modules/proxy/ngx_http_event_proxy_handler.c @@ -371,8 +371,7 @@ static int ngx_http_proxy_process_upstre return NGX_DONE; } - if (p->tries /* STUB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - + if (p->tries > 1 && (rc == NGX_HTTP_BAD_GATEWAY || rc == NGX_HTTP_GATEWAY_TIME_OUT || (rc == NGX_OK @@ -1083,7 +1082,12 @@ static int ngx_http_proxy_read_upstream_ int rc; rc = ngx_event_proxy_read_upstream(p->event_proxy); - if (rc == NGX_OK) { + + if (p->event_proxy->fatal_error) { + return NGX_HTTP_INTERNAL_SERVER_ERROR; + } + + if (p->event_proxy->upstream_eof && p->event_proxy->upstream_error) { rc = ngx_event_close_connection(p->connection->read); }