The IETF has submitted
specifications for new HTTP status codes that more accurately describe some typical situations.
428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
511 Network Authentication Required
The status code 428 (precondition required) means that the server requires the conditions of the request. This is a typical situation when a client receives data on GET, modifies it and sends it back to the server via PUT, but by that time it has already been modified by another client, because of which a conflict occurs. By requiring a conditional request, the server is protected from a conflict. In this case, the conditions for the correct sending of data to the server must be indicated.
HTTP/1.1 428 Precondition Required Content-Type: text/html <html> <head> <title>Precondition Required</title> </head> <body> <h1>Precondition Required</h1> <p>This request is required to be conditional; try using "If-Match".</p> </body> </html>
The status code 429 (too many requests) means that the user sent too many requests in a given period of time. The answer must contain an explanation of the violated condition and may contain a
Retry-After header with an indication of the time that must be waited before repeating.
')
HTTP/1.1 429 Too Many Requests Content-Type: text/html Retry-After: 3600 <html> <head> <title>Too Many Requests</title> </head> <body> <h1>Too many Requests</h1> <p>I only allow 50 requests per hour to this Web site per logged in user. Try again soon.</p> </body> </html>
The status header 431 (request header fields too large) is used when the server refuses to process the request due to the fact that one or more headers in the total exceed the norm. In the second case, the response should contain an indication of which particular title caused the problem.
HTTP/1.1 431 Request Header Fields Too Large Content-Type: text/html <html> <head> <title>Request Header Fields Too Large</title> </head> <body> <h1>Request Header Fields Too Large</h1> <p>The "Example" header was too large.</p> </body> </html>
The status code 511 (network authentication required) means that you need to perform authentication, and the response should contain instructions on how to do this, for example, using an HTML form at the specified address. Error 511 is returned not by the target server, but by a proxy that does not allow the user to the network (for example, a router in the paid Wi-Fi zone with unauthorized access).
For example, a user sends an HTTP request over TCP to port 80.
GET /index.htm HTTP/1.1 Host: www.example.com
The login server returns this response.
HTTP/1.1 511 Network Authentication Required Refresh: 0; url=https://login.example.net/ Content-Type: text/html <html> <head> <title>Network Authentication Required</title> </head> <body> <p>You need to <a href="https://login.example.net/"> authenticate with the local network</a> in order to get access.</p> </body> </html>