7

How should a http client (web-browser or other app) process non-standard HTTP response codes like 190, 290, 320, 420, 540. Actually any which is not defined by RFC2616.

Refer to a widely used standard or a recommendation like RFC please.

Slicedpan
  • 4,995
  • 2
  • 18
  • 33
Maksym Polshcha
  • 18,030
  • 8
  • 52
  • 77
  • 1
    There is a list of extra HTTP codes here http://en.wikipedia.org/wiki/List_of_HTTP_status_codes which explain what some of those are (although only 420 appears there from your list...) – Alexis Wilke Dec 20 '13 at 09:34
  • @AlexisWilke Thank you for the link. 420 is not there. The value doesn't meter actually. What should the app do with the rest of the codes? :-) – Maksym Polshcha Dec 20 '13 at 09:42
  • "420 Enhance Your Calm"-- I'm not saying that there is much you can with with such a code, but it appears on that page... – Alexis Wilke Dec 20 '13 at 11:45

1 Answers1

17

http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-25.html#rfc.section.6.p.2:

HTTP status codes are extensible. HTTP clients are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, a client MUST understand the class of any status code, as indicated by the first digit, and treat an unrecognized status code as being equivalent to the x00 status code of that class, with the exception that a recipient MUST NOT cache a response with an unrecognized status code.

For example, if an unrecognized status code of 471 is received by a client, the client can assume that there was something wrong with its request and treat the response as if it had received a 400 status code. The response message will usually contain a representation that explains the status.

The first digit of the status-code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:

1xx (Informational): The request was received, continuing process
2xx (Successful): The request was successfully received, understood, and accepted
3xx (Redirection): Further action needs to be taken in order to complete the request
4xx (Client Error): The request contains bad syntax or cannot be fulfilled
5xx (Server Error): The server failed to fulfill an apparently valid request
Julian Reschke
  • 40,156
  • 8
  • 95
  • 98