spring-framework
spring-framework copied to clipboard
Fixed DataBufferLimitException in WebFlux result in 413 instead of 500
origin issue: https://github.com/spring-projects/spring-framework/issues/32113
hello. In WebFlux, when a DataBufferLimitException occurs because the payload is larger than the setting value (spring.codec.max-in-memory-size), a 413 Too Large Body status code should be returned, but a 500 status code was returned, so that part has been corrected.
- A ServerWebInputTooLargeException exception was declared, which inherits ResponseStatusException.
- When determining whether there is an error in the request value in AbstractMessageReaderArgumentResolver, if a DataBufferLimitException occurs, it is converted to ServerWebInputTooLargeException.
- Added tooLargeBody test code.
@mysend12 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@mysend12 Thank you for signing the Contributor License Agreement!
origin issue: #32113
- Can you update PR description and commit message to include
Fixes #32113
? - Can you update
copywright 2024
on top of each files?
@injae-kim thanks for trying to help but please refrain from providing guidelines to contributors. The first one is actually wrong, we do not need a reference to the original issue in the commit message.
oh sorry, I got it! actually PR author @mysend12 is my friend and I'm helping him to contribute(by pair programming!) so provide guideline by comment :) I'll don't do this~! 🙇 thank you!
Thanks for your contribution @mysend12 , this is now merged in main and will be shipped with the next 6.2 milestone.