aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_connect.c2
-rw-r--r--src/http/ngx_http_upstream.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/event/ngx_event_connect.c b/src/event/ngx_event_connect.c
index fae9c8c86..a2042c7c9 100644
--- a/src/event/ngx_event_connect.c
+++ b/src/event/ngx_event_connect.c
@@ -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) {
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 43f3ada35..fa847729c 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -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;