# HG changeset patch # User Maxim Dounin # Date 1621869822 -10800 # Node ID 1336a33cff33699a894373d8d863db671907f7c2 # Parent 2ab7b55ae4a02745e2c15035fcf46ef84ebbfde3 Fixed log action when using SSL certificates with variables. When variables are used in ssl_certificate or ssl_certificate_key, a request is created in the certificate callback to evaluate the variables, and then freed. Freeing it, however, updates c->log->action to "closing request", resulting in confusing error messages like "client timed out ... while closing request" when a client times out during the SSL handshake. Fix is to restore c->log->action after calling ngx_http_free_request(). diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1043,12 +1043,14 @@ ngx_http_ssl_certificate(ngx_ssl_conn_t } ngx_http_free_request(r, 0); + c->log->action = "SSL handshaking"; c->destroyed = 0; return 1; failed: ngx_http_free_request(r, 0); + c->log->action = "SSL handshaking"; c->destroyed = 0; return 0; }