From 6ee33c50ba1a9690e8f1459df0cfcc2a57626568 Mon Sep 17 00:00:00 2001 From: YeLi Date: Wed, 9 Apr 2025 19:10:32 +0800 Subject: [PATCH] Fix lua ngx.location.capture 504 --- modules/ngx_http_lua_module/src/ngx_http_lua_subrequest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ngx_http_lua_module/src/ngx_http_lua_subrequest.c b/modules/ngx_http_lua_module/src/ngx_http_lua_subrequest.c index 643385afe5..414c742d0d 100644 --- a/modules/ngx_http_lua_module/src/ngx_http_lua_subrequest.c +++ b/modules/ngx_http_lua_module/src/ngx_http_lua_subrequest.c @@ -1498,6 +1498,12 @@ ngx_http_lua_subrequest(ngx_http_request_t *r, ngx_http_probe_subrequest_start(sr); #endif +#if (T_HTTP_UPSTREAM_TIMEOUT_VAR) + sr->connect_time = NGX_CONF_UNSET_MSEC; + sr->read_time = NGX_CONF_UNSET_MSEC; + sr->send_time = NGX_CONF_UNSET_MSEC; +#endif + return ngx_http_post_request(sr, NULL); }