WrightKD commented on issue #11646: URL: https://github.com/apache/apisix/issues/11646#issuecomment-2429312452
The issue is with the following [line ](https://github.com/apache/apisix/blob/695ea3c29d067d3a445872974e59dff99b505499/apisix/plugins/body-transformer.lua#L89)in the remove_namespace function ```lua tbl[newk] = v ``` New fields are being added to the table while looping through the table. This would cause unpredictable behavior and is not recommend as per the [Lua manual](https://www.lua.org/manual/5.4/manual.html#pdf-next) ```markdown You should not assign any value to a non-existent field in a table during its traversal. You may however modify existing fields. In particular, you may set existing fields to nil ``` A new table should be created instead with the new fields without the xml namespace. -- 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]
