Warning

The Warning HTTP header has been deprecated and was used to convey information about possible problems with the message.

Usage

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>]

Note

The HTTP Warning header is no longer supported and shall be avoided except for backward compatibility.

Warning-code

The warning code is a three-digit number that indicates the specific warning.

Warning codeDescription
110Response is Stale
111Revalidation Failed
112Disconnected Operation
113Heuristic Expiration
199Miscellaneous Warning
214Transformation Applied
299Miscellaneous 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.

Warning-agent

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.

Warning-text

The warning text contains a description of the problem.

Warning-date

The warning date contains an optional field to indicate when the warning was generated.

Takeaway

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.

See also

Last updated: June 20, 2022