-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Modify status code 103 to ("Early Hints") #27960
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
Conversation
According to rfc8297(https://tools.ietf.org/html/rfc8297), the reason phase of status code 103 should be "Early Hints", not "Checkpoint". This commit modifies the status code 103 reason phase from ("Checkpoint") to ("Early Hints").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We unfortunately cannot accept the current proposal since it introduces breaking changes -- by changing the names of existing methods and constants.
The correct way to achieve this would be to introduce the new constants and methods and simultaneously deprecate the existing ones (pointing to the new variants).
Thank you for replying and suggesting. However i am wondering that if preserve the old constants, is that ok when use old constants value to call the method
|
This commit takes rfc8297 into account and introduces a newer code 103 HttpStatus value which uses `Early Hints` as the more correct reason phrase, deprecating the outdated `CHECKPOINT` enum value for 103. Additionally: - `HttpStatus.valueOf(103)` will return the new enum value - `HttpStatusCode#isSameCodeAs(HttpStatusCode)` is introduced to ease comparison of deprecated enums vs their newer counterparts (or any instance of a more generic `HttpStatusCode`) by comparing the integer `value()` - `HttpStatusTests` covers the new deprecation as well as the three previously deprecated codes, including a check with the above new method to ensure they have comparable integer values Supersedes and Closes spring-projectsgh-27960
This commit takes rfc8297 into account and introduces a newer code 103 HttpStatus value which uses `Early Hints` as the more correct reason phrase, deprecating the outdated `CHECKPOINT` enum value for 103. Additionally: - `HttpStatus.valueOf(103)` will return the new enum value - `HttpStatusCode#isSameCodeAs(HttpStatusCode)` is introduced to ease comparison of deprecated enums vs their newer counterparts (or any instance of a more generic `HttpStatusCode`) by comparing the integer `value()` - `HttpStatusTests` covers the new deprecation as well as the three previously deprecated codes, including a check with the above new method to ensure they have comparable integer values Supersedes and Closes gh-27960
According to rfc8297(https://tools.ietf.org/html/rfc8297), the reason
phase of status code 103 should be "Early Hints", not "Checkpoint".
This commit modifies the status code 103 reason phase from ("Checkpoint")
to ("Early Hints").