membphis commented on code in PR #13377:
URL: https://github.com/apache/apisix/pull/13377#discussion_r3246332709
##########
apisix/patch.lua:
##########
@@ -386,20 +386,23 @@ function _M.patch()
local _orig_set_body_data = ngx.req.set_body_data
ngx.req.set_body_data = function(data)
local api_ctx = ngx.ctx.api_ctx
- if api_ctx and api_ctx._post_arg_request_body then
- api_ctx._post_arg_request_body = nil
- local var = api_ctx.var
- local cache = var and var._cache
- if cache then
- local keys_to_clear = {}
- for key in pairs(cache) do
- if type(key) == "string" and key:sub(1, 9) == "post_arg."
then
- keys_to_clear[#keys_to_clear + 1] = key
+ if api_ctx then
+ api_ctx._request_body_tab = nil
+ if api_ctx._post_arg_request_body then
+ api_ctx._post_arg_request_body = nil
Review Comment:
good catch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]