Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed DataBufferLimitException in WebFlux result in 413 instead of 500 #32558

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mysend12
Copy link

@mysend12 mysend12 commented Mar 31, 2024

origin issue: #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.

  1. A ServerWebInputTooLargeException exception was declared, which inherits ResponseStatusException.
  2. When determining whether there is an error in the request value in AbstractMessageReaderArgumentResolver, if a DataBufferLimitException occurs, it is converted to ServerWebInputTooLargeException.
  3. Added tooLargeBody test code.

@pivotal-cla
Copy link

@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.

@pivotal-cla
Copy link

@mysend12 Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 31, 2024
Copy link

@mamadaliev mamadaliev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@injae-kim

This comment was marked as resolved.

@mysend12 mysend12 force-pushed the fix/payload-too-large-status-code branch from 79e39c7 to 3ca0ba9 Compare April 1, 2024 11:20
@mysend12 mysend12 force-pushed the fix/payload-too-large-status-code branch from 3ca0ba9 to 0b57b6c Compare April 1, 2024 11:31
@snicoll
Copy link
Member

snicoll commented Apr 4, 2024

@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.

@injae-kim
Copy link
Contributor

injae-kim commented Apr 4, 2024

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!

@snicoll snicoll added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 4, 2024
@snicoll snicoll added this to the 6.2.x milestone Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants