comparison src/http/modules/proxy/ngx_http_proxy_upstream.c @ 344:e366ba5db8f8

nginx-0.0.3-2004-06-01-10:04:46 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 01 Jun 2004 06:04:46 +0000
parents 6bdf858bff8c
children 7650aea1816f
comparison
equal deleted inserted replaced
343:6bdf858bff8c 344:e366ba5db8f8
699 return; 699 return;
700 } 700 }
701 701
702 /* rc == NGX_OK */ 702 /* rc == NGX_OK */
703 703
704 if (c->tcp_nopush) { 704 if (c->tcp_nopush == NGX_TCP_NOPUSH_SET) {
705 if (ngx_tcp_push(c->fd) == NGX_ERROR) { 705 if (ngx_tcp_push(c->fd) == NGX_ERROR) {
706 ngx_log_error(NGX_LOG_CRIT, c->log, 706 ngx_log_error(NGX_LOG_CRIT, c->log,
707 ngx_socket_errno, 707 ngx_socket_errno,
708 ngx_tcp_push_n " failed"); 708 ngx_tcp_push_n " failed");
709 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR); 709 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR);
710 return; 710 return;
711 } 711 }
712 712
713 c->tcp_nopush = 0; 713 c->tcp_nopush = NGX_TCP_NOPUSH_UNSET;
714 return; 714 return;
715 } 715 }
716 716
717 ngx_add_timer(c->read, p->lcf->read_timeout); 717 ngx_add_timer(c->read, p->lcf->read_timeout);
718 718
1136 if (ngx_http_proxy_copy_header(p, &p->upstream->headers_in) == NGX_ERROR) { 1136 if (ngx_http_proxy_copy_header(p, &p->upstream->headers_in) == NGX_ERROR) {
1137 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR); 1137 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR);
1138 return; 1138 return;
1139 } 1139 }
1140 1140
1141 /* TODO: preallocate event_pipe hunks, look "Content-Length" */ 1141 /* TODO: preallocate event_pipe bufs, look "Content-Length" */
1142 1142
1143 rc = ngx_http_send_header(r); 1143 rc = ngx_http_send_header(r);
1144 1144
1145 p->header_sent = 1; 1145 p->header_sent = 1;
1146 1146