From 1437b60164a05395cf35599a7c2f3a9d1d4f995d Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Fri, 24 Nov 2023 08:50:42 +0545 Subject: [PATCH] fix: closing brace should not be a part of variable (#10485) --- apisix/core/utils.lua | 6 +++-- t/plugin/fault-injection2.t | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/apisix/core/utils.lua b/apisix/core/utils.lua index 70531e7c1fa9..adca3d856d8c 100644 --- a/apisix/core/utils.lua +++ b/apisix/core/utils.lua @@ -292,11 +292,13 @@ local resolve_var do local _ctx local n_resolved - local pat = [[(?= 300 then + ngx.status = code + end + ngx.say(body) + } + } +--- response_body +passed + + + +=== TEST 7: test route +--- request +GET /hello?count=2 +--- response_body chomp +{"count": 2}