comparison 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
comparison
equal deleted inserted replaced
9252:51e0dc713784 9253:a6649497a762
2593 } 2593 }
2594 2594
2595 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 2595 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
2596 "using location: %V \"%V?%V\"", 2596 "using location: %V \"%V?%V\"",
2597 name, &r->uri, &r->args); 2597 name, &r->uri, &r->args);
2598
2599 r->connection->log->action = NULL;
2598 2600
2599 r->internal = 1; 2601 r->internal = 1;
2600 r->content_handler = NULL; 2602 r->content_handler = NULL;
2601 r->uri_changed = 0; 2603 r->uri_changed = 0;
2602 r->loc_conf = (*clcfp)->loc_conf; 2604 r->loc_conf = (*clcfp)->loc_conf;