# HG changeset patch # User Maxim Dounin # Date 1714231116 -10800 # Node ID a6649497a76272c946ae8ec42b5028663b3da872 # Parent 51e0dc7137843feda75b497773f598d3836c60a1 Reset c->log->action on redirect to a named location. This matches what happens on internal redirects in ngx_http_handler(), and ensures that stale log actions, such as "sending to client" from the upstream module, are not used after an error_page redirection to a named location. diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2596,6 +2596,8 @@ ngx_http_named_location(ngx_http_request "using location: %V \"%V?%V\"", name, &r->uri, &r->args); + r->connection->log->action = NULL; + r->internal = 1; r->content_handler = NULL; r->uri_changed = 0;