mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 14:09:25 +00:00
Make HttpStatus.resolve return non-deprecated one
In previous versions, HttpStatus.resolve (or valueOf) always returned non-deprecated HTTP status for given code. This was ensured implicitly, by placing non-deprecated enum entries before their respective deprecations. This was not ensured for 413 Content Too Large. See gh-35659 Signed-off-by: Damian Malczewski <damian.m.malczewski@gmail.com>
This commit is contained in:
committed by
Brian Clozel
parent
5accc21223
commit
8a6576eace
@@ -220,6 +220,13 @@ public enum HttpStatus implements HttpStatusCode {
|
||||
* HTTP Semantics, section 15.5.13</a>
|
||||
*/
|
||||
PRECONDITION_FAILED(412, Series.CLIENT_ERROR, "Precondition Failed"),
|
||||
/**
|
||||
* {@code 413 Content Too Large}.
|
||||
* @since 7.0
|
||||
* @see <a href="https://datatracker.ietf.org/doc/html/rfc9110#name-413-content-too-large">
|
||||
* HTTP Semantics, section 15.5.14</a>
|
||||
*/
|
||||
CONTENT_TOO_LARGE(413, Series.CLIENT_ERROR, "Content Too Large"),
|
||||
/**
|
||||
* {@code 413 Payload Too Large}.
|
||||
* @since 4.1
|
||||
@@ -229,13 +236,6 @@ public enum HttpStatus implements HttpStatusCode {
|
||||
*/
|
||||
@Deprecated(since = "7.0")
|
||||
PAYLOAD_TOO_LARGE(413, Series.CLIENT_ERROR, "Payload Too Large"),
|
||||
/**
|
||||
* {@code 413 Content Too Large}.
|
||||
* @since 7.0
|
||||
* @see <a href="https://datatracker.ietf.org/doc/html/rfc9110#name-413-content-too-large">
|
||||
* HTTP Semantics, section 15.5.14</a>
|
||||
*/
|
||||
CONTENT_TOO_LARGE(413, Series.CLIENT_ERROR, "Content Too Large"),
|
||||
/**
|
||||
* {@code 414 URI Too Long}.
|
||||
* @since 4.1
|
||||
|
||||
Reference in New Issue
Block a user