jakartaee / rest

Jakarta RESTful Web Services
Other
353 stars 114 forks source link

On Deprecated Reason - Phrase #1154

Open jansupol opened 1 year ago

jansupol commented 1 year ago

RFC 2616 describes Response status codes and the respective reason phrase. That's what was used at the time of creating ReasonPhrase in JAX-RS.

The RFC 7230 says the reason-phrase should be ignored by the client:

The reason-phrase element exists for the sole purpose of providing a textual description associated with the numeric status code, mostly out of deference to earlier Internet application protocols that were more frequently used with interactive text clients. A client SHOULD ignore the reason-phrase content.

The API [reason-phrase](https://jakarta.ee/specifications/restful-ws/3.1/apidocs/jakarta.ws.rs/jakarta/ws/rs/core/response.statustype#getReasonPhrase()) makes customer create the response with the reason phrase, but the deprecated reason phrase is not well propagated to the customer.

WDYT, should Jakarta REST continue with supporting the reason phrase?

mkarg commented 1 year ago

I never understood the benefits of the reason phrase and never used it or never saw code that used it. OTOH I do not see the benefit of dropping it. Dropping it might make existing code break, so why should we drop it?

spericas commented 11 months ago

I agree with @mkarg