diff src/http/ngx_http_core_module.c @ 9253:a6649497a762

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Apr 2024 18:18:36 +0300
parents 73eb75bee30f
children f798ecafec05
line wrap: on
line diff
--- 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;