openresty / openresty/lua-nginx-module
File Format Change from csv to string while adding data in request body
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
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:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the multipart request using kong.request.get_body() and kong.service.request.set_body() with the shown vendor value, then inspect the request-body handling entry points for how multipart file fields are represented. Done means the edited request preserves the multipart file parameter and no longer produces the reported 400 Bad Request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100