diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2018-07-02 19:02:31 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2018-07-02 19:02:31 +0300 |
commit | 1331a99f5c55cb1aff399000af56b17a43552e3f (patch) | |
tree | bb19f68d822431a44a482a437238da5d9586b923 | |
parent | d842b4e5e0ebda87559d804de29dd56bd4cbc4dc (diff) | |
download | nginx-1331a99f5c55cb1aff399000af56b17a43552e3f.tar.gz nginx-1331a99f5c55cb1aff399000af56b17a43552e3f.zip |
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.
-rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 47cc6cc55..688acd806 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1556,6 +1556,10 @@ ngx_http_upstream_connect(ngx_http_request_t *r, ngx_http_upstream_t *u) c->sendfile &= r->connection->sendfile; u->output.sendfile = c->sendfile; + if (r->connection->tcp_nopush == NGX_TCP_NOPUSH_DISABLED) { + c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED; + } + if (c->pool == NULL) { /* we need separate pool here to be able to cache SSL connections */ |