commit | 15652e4b749bd4745990d801484133856daf9426 | [log] [tgz] |
---|---|---|
author | Patryk Lesiewicz <patryk@google.com> | Fri Dec 01 13:37:35 2017 -0800 |
committer | Piotr Sikora <piotrsikora@google.com> | Fri Dec 01 23:12:05 2017 +0000 |
tree | 6d37cf1cc0a22f841ef3799ed8d1b44588832745 | |
parent | 1b697c7e7974c0d1237c378b47cc8ea695e35e0b [diff] |
Upstream: flush low-level buffers on write retry. If the data to write is bigger than what the socket can send and the reminder is smaller than NGX_SSL_BUFSIZE, then SSL_write() fails with SSL_ERROR_WANT_WRITE. The reminder of payload however is successfully copied to the low-level buffer and all the output chain buffers are flushed. This means that retry logic doesn't work because ngx_http_upstream_process_non_buffered_request() checks only if there's anything in the output chain buffers and ignores the fact that something may be buffered in low-level parts of the stack. Change-Id: I7ae8279dd3f95e69853e83ab14a707e30efe66a8 Signed-off-by: Patryk Lesiewicz <patryk@google.com> Reviewed-on: https://nginx-review.googlesource.com/3260 Reviewed-by: Piotr Sikora <piotrsikora@google.com>
To build nginx
binary with Bazel:
$ bazel build :nginx
To build Debian package:
$ bazel build :nginx-google.deb
This repository is currently maintained by Google developers.
Any code changes should be submitted to upstream NGINX.
Copyright (C) 2002-2017 Igor Sysoev Copyright (C) 2011-2017 Nginx, Inc. Copyright (C) 2015-2017 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This is not an official Google product.