Mercurial > hg > nginx-quic
comparison src/http/modules/proxy/ngx_http_event_proxy_handler.c @ 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 |
comparison
equal
deleted
inserted
replaced
79:eacfdd1c31b9 | 80:939bc7cd9a90 |
---|---|
369 return ngx_http_proxy_finalize_request(p, | 369 return ngx_http_proxy_finalize_request(p, |
370 NGX_HTTP_INTERNAL_SERVER_ERROR); | 370 NGX_HTTP_INTERNAL_SERVER_ERROR); |
371 return NGX_DONE; | 371 return NGX_DONE; |
372 } | 372 } |
373 | 373 |
374 if (p->tries /* STUB !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ | 374 if (p->tries > 1 |
375 | |
376 && (rc == NGX_HTTP_BAD_GATEWAY | 375 && (rc == NGX_HTTP_BAD_GATEWAY |
377 || rc == NGX_HTTP_GATEWAY_TIME_OUT | 376 || rc == NGX_HTTP_GATEWAY_TIME_OUT |
378 || (rc == NGX_OK | 377 || (rc == NGX_OK |
379 && p->status == NGX_HTTP_INTERNAL_SERVER_ERROR | 378 && p->status == NGX_HTTP_INTERNAL_SERVER_ERROR |
380 && p->lcf->retry_500_error))) | 379 && p->lcf->retry_500_error))) |
1081 static int ngx_http_proxy_read_upstream_body(ngx_http_proxy_ctx_t *p) | 1080 static int ngx_http_proxy_read_upstream_body(ngx_http_proxy_ctx_t *p) |
1082 { | 1081 { |
1083 int rc; | 1082 int rc; |
1084 | 1083 |
1085 rc = ngx_event_proxy_read_upstream(p->event_proxy); | 1084 rc = ngx_event_proxy_read_upstream(p->event_proxy); |
1086 if (rc == NGX_OK) { | 1085 |
1086 if (p->event_proxy->fatal_error) { | |
1087 return NGX_HTTP_INTERNAL_SERVER_ERROR; | |
1088 } | |
1089 | |
1090 if (p->event_proxy->upstream_eof && p->event_proxy->upstream_error) { | |
1087 rc = ngx_event_close_connection(p->connection->read); | 1091 rc = ngx_event_close_connection(p->connection->read); |
1088 } | 1092 } |
1089 | 1093 |
1090 return rc; | 1094 return rc; |
1091 } | 1095 } |