Open vikas-nykaa opened 2 years ago
can you give a minimal nginx.conf that can reproduce this issue
@zhuizhuhaomeng You can reproduce this issue by upload csv file in Request body of multipart-form/data request. And in lua scripts add one more parameter in request body. after that API will not work fine
you can print the body to see if it is expected. if the body get by kong.request.get_body() is multiform format, then it is not your expected?
I am adding one parameter in request body if POST request (Content-Type= "multipart-form/data") but after adding when i set edited body in kong request, file format changed from csv to string. And i am getting 400 Bad Request because MultiPartFile parameter not found in Request Body. Pls help
Code:
local body = kong.request.get_body() body["vendor"]="{ "vendorId" : "vikas", "vendorName" : "vikas" }" kong.service.request.set_body(body)
Request Body: