spring-cloud / spring-cloud/spring-cloud-gateway
Cache body for form requests
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Describe the bug
I have a gateway application configured to route requests to some backend service. The app has a single page which sends POST requests to this service. It also has a web filter which tries to read form data from the requests.
The issue is, form POSTs hang and eventually timeout. It appears to be caused by the web filter reading the form data, as AJAX POST requests (using query params instead of form data) do work. See the sample.
Gateway version: 2.2.1.RELEASE
Sample
(originally reported against Spring Security, hence the name, but this is reproducible with only the gateway)
https://github.com/SmithJosh/spring-security-8026/
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 linked spring-security-8026 sample and reproduce the form POST timeout through the gateway. Trace the web filter's form-data read and the gateway's request forwarding path. Done means form-encoded POST requests complete successfully, while the existing query-parameter POST behavior remains working.
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