monkeyDluffy6017 commented on code in PR #10496:
URL: https://github.com/apache/apisix/pull/10496#discussion_r1400062934


##########
apisix/plugins/body-transformer.lua:
##########
@@ -159,24 +171,30 @@ local function transform(conf, body, typ, ctx)
 end
 
 
-local function set_input_format(conf, typ, ct)
+local function set_input_format(conf, typ, ct, method)
+    if method == "GET" then
+        conf[typ].input_format = "args"
+    end
     if conf[typ].input_format == nil and ct then
         if ct:find("text/xml") then
             conf[typ].input_format = "xml"
         elseif ct:find("application/json") then
             conf[typ].input_format = "json"
+        elseif str_find(ct:lower(), "application/x-www-form-urlencoded", nil, 
true) then

Review Comment:
   Use `core.string.find` instead



-- 
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]

Reply via email to