comparison src/http/ngx_http_request.c @ 7847:1336a33cff33

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().
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 24 May 2021 18:23:42 +0300
parents 4a9d28f8f39e
children 5f765427c17a d514f88053e5
comparison
equal deleted inserted replaced
7846:2ab7b55ae4a0 7847:1336a33cff33
1041 goto failed; 1041 goto failed;
1042 } 1042 }
1043 } 1043 }
1044 1044
1045 ngx_http_free_request(r, 0); 1045 ngx_http_free_request(r, 0);
1046 c->log->action = "SSL handshaking";
1046 c->destroyed = 0; 1047 c->destroyed = 0;
1047 return 1; 1048 return 1;
1048 1049
1049 failed: 1050 failed:
1050 1051
1051 ngx_http_free_request(r, 0); 1052 ngx_http_free_request(r, 0);
1053 c->log->action = "SSL handshaking";
1052 c->destroyed = 0; 1054 c->destroyed = 0;
1053 return 0; 1055 return 0;
1054 } 1056 }
1055 1057
1056 #endif 1058 #endif