summaryrefslogtreecommitdiffhomepage
path: root/src/http
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2021-06-01 17:37:51 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2021-06-01 17:37:51 +0300
commit63572fce5577dd5ec68bb1204d20cdb946cd6418 (patch)
tree94e2a564f12bd3d4698783bfdde35f3903a8f31a /src/http
parent4a5108b203404e6a2453e58fce667bde84e603b2 (diff)
downloadnginx-63572fce5577dd5ec68bb1204d20cdb946cd6418.tar.gz
nginx-63572fce5577dd5ec68bb1204d20cdb946cd6418.tar.bz2
Fixed SSL logging with lingering close.
Recent fixes to SSL shutdown with lingering close (554c6ae25ffc, 1.19.5) broke logging of SSL variables. To make sure logging of SSL variables works properly, avoid freeing c->ssl when doing an SSL shutdown before lingering close. Reported by Reinis Rozitis (http://mailman.nginx.org/pipermail/nginx/2021-May/060670.html).
Diffstat (limited to 'src/http')
-rw-r--r--src/http/ngx_http_request.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 684fabdd6..136c4615b 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -3398,6 +3398,8 @@ ngx_http_set_lingering_close(ngx_connection_t *c)
if (c->ssl) {
ngx_int_t rc;
+ c->ssl->shutdown_without_free = 1;
+
rc = ngx_ssl_shutdown(c);
if (rc == NGX_ERROR) {