spring-cloud / spring-cloud/spring-cloud-gateway
servlet.multipart.enabled is disabled by default in 4.2.1
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
Starting from Spring Cloud Gateway 4.2.1, the default behavior for handling multipart requests has changed. If servlet.multipart.enabled: true is not explicitly set, this setting is disabled by MultipartEnvironmentPostProcessor and body parameters from multipart/form-data requests are not accessible.
This differs from previous behavior and from Spring Boot’s default, making it an unexpected change for users upgrading. Maybe a reference in the release notes or in the documentation could be useful ?
Sample
A minimal Spring Boot application using spring-cloud-starter-gateway-mvc:4.2.1 with a POST request containing multipart/form-data parameters does not receive expected body parameters unless the following is explicitly added:
spring:
servlet:
multipart:
enabled: true
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 minimal Spring Boot application described in the issue and verify multipart/form-data body parameters with spring-cloud-starter-gateway-mvc:4.2.1. Inspect MultipartEnvironmentPostProcessor and the release notes or documentation to determine how this changed from previous behavior. Done means the behavior is corrected or the setting and upgrade impact are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100