]> git.kaiwu.me - nginx.git/commitdiff
upstream sendfile bit was overridden by r->connection->sendfile
authorIgor Sysoev <igor@sysoev.ru>
Tue, 14 Aug 2007 20:44:09 +0000 (20:44 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 14 Aug 2007 20:44:09 +0000 (20:44 +0000)
src/event/ngx_event_connect.c
src/http/ngx_http_upstream.c

index fae9c8c86b11f1f103e0333e42e785f0dad6e585..a2042c7c99ff588e83ef3871e999992e36a9528f 100644 (file)
@@ -85,6 +85,8 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
     c->recv_chain = ngx_recv_chain;
     c->send_chain = ngx_send_chain;
 
+    c->sendfile = 1;
+
     c->log_error = pc->log_error;
 
     if (pc->sockaddr->sa_family != AF_INET) {
index 43f3ada35ea9ef55e8caadcc9400954903b2bc1a..fa847729c78db3df9e73eaabc2f148e5a4bbd094 100644 (file)
@@ -583,7 +583,7 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u)
     c->write->handler = ngx_http_upstream_send_request_handler;
     c->read->handler = ngx_http_upstream_process_header;
 
-    c->sendfile = r->connection->sendfile;
+    c->sendfile &= r->connection->sendfile;
 
     c->pool = r->pool;
     c->read->log = c->write->log = c->log = r->connection->log;