The Warning HTTP header has been deprecated and was used to convey information about possible problems with the message.
The Warning HTTP header contains information about potential problems with the contents of the message and can be applied to messages of any type. Each message can contain more than one warning code. That said, there are specific warning messages for cache-related messages and will only appear in HTTP responses.
The general syntax is:
Warning: <warning-code> <warning-agent> <warning-text> [<warning-date>]
The HTTP Warning header is no longer supported and shall be avoided except for backward compatibility.
The warning code is a three-digit number that indicates the specific warning.
|110||Response is Stale|
|299||Miscellaneous Persistent Warning|
Warning codes are divided into two categories, which are identified by the first digit.
1XX warning codes are for HTTP response messages and are included to describe the freshness or validation status of the message. These are deleted from the message post-validation.
2XX warning codes are to inform the client about a characteristic of the representation that can not be remedied through validation. Messages of this type are not deleted post-validation unless a complete response is sent. When a complete response is sent, they are removed.
The warning agent contains the name or alias of the server that added the warning HTTP header. In cases where the server is unnamed or is not known, a hyphen “-“ may be present.
The warning text contains a description of the problem.
The warning date contains an optional field to indicate when the warning was generated.
The HTTP Warning header is used to indicate possible problems in HTTP messages. This HTTP header is obsolete but the status codes are still defined.