Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 7306:8eab05b83dde
Upstream: fixed unexpected tcp_nopush usage on peer connections.
Now tcp_nopush on peer connections is disabled if it is disabled on
the client connection, similar to how we handle c->sendfile. Previously,
tcp_nopush was always used on upstream connections, regardless of
the "tcp_nopush" directive.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 02 Jul 2018 19:02:31 +0300 |
parents | a10e5fe44762 |
children | ece9b5454b8a |
comparison
equal
deleted
inserted
replaced
7305:6cfd45d4c754 | 7306:8eab05b83dde |
---|---|
1554 u->read_event_handler = ngx_http_upstream_process_header; | 1554 u->read_event_handler = ngx_http_upstream_process_header; |
1555 | 1555 |
1556 c->sendfile &= r->connection->sendfile; | 1556 c->sendfile &= r->connection->sendfile; |
1557 u->output.sendfile = c->sendfile; | 1557 u->output.sendfile = c->sendfile; |
1558 | 1558 |
1559 if (r->connection->tcp_nopush == NGX_TCP_NOPUSH_DISABLED) { | |
1560 c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; | |
1561 } | |
1562 | |
1559 if (c->pool == NULL) { | 1563 if (c->pool == NULL) { |
1560 | 1564 |
1561 /* we need separate pool here to be able to cache SSL connections */ | 1565 /* we need separate pool here to be able to cache SSL connections */ |
1562 | 1566 |
1563 c->pool = ngx_create_pool(128, r->connection->log); | 1567 c->pool = ngx_create_pool(128, r->connection->log); |