summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_request_body.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2020-11-06 23:44:54 +0300
committerRuslan Ermilov <ru@nginx.com>2020-11-06 23:44:54 +0300
commitad2b9944b012699c225d75e63aeadf61d9ce3367 (patch)
treeb1f5b5fae77cf296e2faf1b635d2db97c6fe569e /src/http/ngx_http_request_body.c
parentaad0d1bf1cab58a1b1e1499485e63b7a15ab183c (diff)
downloadnginx-ad2b9944b012699c225d75e63aeadf61d9ce3367.tar.gz
nginx-ad2b9944b012699c225d75e63aeadf61d9ce3367.tar.bz2
SSL: fixed non-working SSL shutdown on lingering close.
When doing lingering close, the socket was first shut down for writing, so SSL shutdown initiated after lingering close was not able to send the close_notify alerts (ticket #2056). The fix is to call ngx_ssl_shutdown() before shutting down the socket.
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r--src/http/ngx_http_request_body.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 71d7e9ab8..f3b938382 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -674,6 +674,7 @@ ngx_http_discarded_request_body_handler(ngx_http_request_t *r)
if (rc == NGX_OK) {
r->discard_body = 0;
r->lingering_close = 0;
+ r->lingering_time = 0;
ngx_http_finalize_request(r, NGX_DONE);
return;
}