Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] RFC 6585 Additional HTTP status codes

I have more than one time created my own enum to hold all the codes defined and those not defined in the Servlet spec.

I know it is too great a change to transition away from the current constants, but an enum that contained all the current codes and any missing extra codes could also hold a string containing the descriptive text defined for those error codes as an information source and the already defined constants could reference the int values of said enum.

The general idea is something like this example (but not exactly like this since I feel this class here has too much logic but it should demonstrate my point) https://github.com/OpenLiberty/open-liberty/blob/integration/dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/channel/values/StatusCodes.java

- Ray

On Wed, Jul 15, 2020 at 6:05 AM Mark Thomas <markt@xxxxxxxxxx> wrote:
Hi,

I am starting the final proof read of the Servlet spec. Possibly the
first time I will have read the spec from cover to cover in one go.
Anyway...

We reference RFC 6585 under "Other Important References" but we make no
other reference to it in the spec. Neither do we declare constants for
those status codes in HttpServletResponse.

We also reference RFC 7231 which in turn references the IANA registry
for status codes.

So, my question is what do we want to do about the various HTTP status
codes that have been added?

My current thinking is:
- remove the RFC 6585 reference from the spec because:
  a) we don't reference it or the status codes it defines
  b) there are many other status codes
  c) all the status codes are in the IANA registry which is referenced
     by RFC 7231 (which we do reference)
- create an issue for 5.1 to create constants for all the status codes
  in the IANA registry

Thoughts?

Mark
_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)

Back to the top