spring-cloud / spring-cloud/spring-cloud-gateway
Spring Cloud Gateway MVC : Multipart + Query Param is not working
Open
Nobody has claimed this yet.
waiting-for-triage
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Describe the bug
Send multipart request and also query parameter, the query parameter is not forwarded to backend service
Spring Cloud Version : 2023.0.3
Sample
spring.cloud.gateway.mvc.routes[0].id=NOCHECK
spring.cloud.gateway.mvc.routes[0].uri=https://engvxhu8p8n2b.x.pipedream.net
spring.cloud.gateway.mvc.routes[0].predicates[0]=Path=/backend/nocheck/**
Example Curl :
curl --location 'http://localhost:8089/backend/nocheck/eko?orderId=27006607934&storeId=10001&clientId=off2on-mobile&channelId=off2on-mobile&requestId=7bcf27c6-ef84-4715-9a9b-a77ff77ddb43&username=b80edb9d-790e-4563-aaf8-a61dd128a653%40blibli' \
--header 'Content-Type: multipart/form-data' \
--form 'name="Eko"' \
--form 'hello="test"'
Backend Received :
Contributor guide
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
Start with the Spring Cloud Gateway MVC route configuration and reproduce the issue using the provided curl request, including both multipart fields and query parameters. Trace how this request is forwarded to the backend; done means the backend receives the query parameters together with the multipart form data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100