500 response for ResourceHttpRequestHandler when requested range is not satisfied #34490
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: feedback-provided
Feedback has been provided
status: waiting-for-triage
An issue we've not yet triaged or decided on
When sending a request to a resource with an invalid range, the server responds with a 500 Internal server error instead of 416 Requested range not satisfiable.
When the
ResourceHttpRequestHandler
is executed with an invalid range then it will call theHttpServletResponse.sendError(HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE)
method:spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
Lines 578 to 581 in 75329e6
ProblemDetail
body response, so thewriteWithMessageConverters
method inAbstractMessageConverterMethodProcessor
will throw aHttpMessageNotWritableException
from:spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodProcessor.java
Lines 364 to 367 in 8b14bf8
valueType
isjava.util.LinkedHashMap
andcontentType
ismultipart/form-data
)The text was updated successfully, but these errors were encountered: