Open DidierLoiseau opened 5 months ago
Other changes that I could spot looking at https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml are:
413
: PAYLOAD_TOO_LARGE
becomes CONTENT_TOO_LARGE
with slight variations in wording around protocols that allow request termination instead of connection close421
: new MISDIRECT_REQUEST
(we do have a deprecated enum value for the WebDAV code)422
: UNPROCESSABLE_ENTITY
becomes UNPROCESSABLE_CONTENT
509
: BANDWIDTH_LIMIT_EXCEEDED
seems to now be Unassigned510
: NOT_EXTENDED
obsoleted (RFC2774 moved to Historic)We discussed this as a team and we feel such a refresh would best be done after the 6.2.x timeframe, at a minimum. This would imply a full pass on HttpStatus
to deprecate codes, introduce new ones and refresh the links in the javadocs.
@simonbasle It’s the first time I hear about Spring 7, wouldn’t it make sense to already deprecate those which should be, so that you can change them in 7? I guess 7 is still far away, isn’t it?
Also wouldn’t it be possible to add the new ones already if they don’t clash with anything, so that users don’t have to wait for 7?
(I agree this is a nice to have for now since raw status codes can be used too, but on the other hand RFC 9110 is already 2 years old)
yes, sorry, I should have said "after the 6.2.x timeframe, at a minimum". In the meantime, I'd recommend using the raw codes or HttpStatusCode.valueOf(int)
as a way of dealing with both known and unknown codes.
An issue can't be both an enhancement and a documentation so I've removed the former. @simonbasle can you please rephrase the title to properly describe the enhancement? Thanks!
Hi @snicoll @simonbasle @bclozel! Can I help with this? Here is my step-by-step plan:
Let me know if my assistance would be useful or if there are any specific areas I should focus on! Thanks!
Affects: 6.1
The
HttpStatus
javadoc links to HTTP Status Code Registry, which in turn refers to RFC9110 (published in June 2022). However the detailed documentation forHttpStatus
’s values still refer to RFC7231, which was obsoleted by the former.Some statuses have been updated. In particular, statuses 421 & 422 which used to be part of WebDav are now part of this RFC. I didn’t check for all statuses or other usages in the documentation.