HTTP headers | Warning
The HTTP headers allows the customer and server to pass additional information with an HTTP solicitation or response. The Warning general HTTP header entertains the information about potential problems with the status of the message which might not be reflected in the message. The field itself consists of the warn-code, a warn-agent, a warn-text, and an optional warn-date. More than one Warning header may show up in response. Warning header fields can be applied to any message, however, used to warn about a possible lack of semantic transparency from caches operations and can only be applied to transformation messages.
Warning: <3-DIGIT-warn-code> <SP warn-agent> <SP warn-text> [< SP warn-date>]
Directive: This header accepts four directive as mentioned above and describe below:
<warn-code>: It is a three-digit caution number which should be written in natural language, where the first digit indicates whether the Warning is required to be erased from a stored response after approval. The warning codes provide data supplemental to the status code in SIP reaction messages. The Warning codes in the 1xx and 2xx range are specific to the HTTP.
- 1xx warn-codes: It depicts the freshness or revalidation status of the response, and must be deleted after a successful revalidation.It is generated by a cache only when approving a cached entry. It must not be engendered by the customer.
- 2xx warn-codes: It describes some aspect of the representation that isn’t redressed by a validation and will not be deleted by a cache after approval unless a full response is sent.
<warn-agent>: It indicates what server has added/inserted the header field. The name or pseudonym of the server or software adding the Warning header (might be “-” when the agent is unknown).
<warn-text>: It is enclosed in quotes (warn-text = quoted-string), the advisory text displaying the error that is most likely to be comprehensible to the user receiving the response.
<warn-date>:It is Optional. In the event that more than one Warning header is sent, incorporate a date that matches the Date header (warn-date = HTTP-date ).
The warn-codes and the recommended warn-text, are listed below in the table: Response is Stale Revalidation Failed Disconnected Operation Heuristic Expiration Miscellaneous Warning Transformation Applied Miscellaneous Persistent Warning
Warn-Code Warn-Text Description 110 It must be included whenever a sent response is stale. 111 It must be incorporated if a cache returns a stale response because an endeavor to approve the failed response, due to an powerlessness to reach the server. 112 It ought to be incorporated if the cache is deliberately disengaged from the rest of the server network for a period of time. 113 It must be encapsulated if a cache heuristically picks a caching freshness lifetime greater than 24 hours and the response’s age is more than 24 hours. 199 The warning-text may include whimsical information to be introduced to a client. A framework accepting this sort of caution must not make any automated step, other than introducing the caution to the client. 214 It ought to be incorporated by a proxy or cache on the off chance that it applies any change to response, for example, changing the content-coding, media-type of the response, or the entity-body of the response, unless this caution code already appears in the response.
299 This is same as warn-code 199, yet illustrate a obstinate warning message to the user.
Response is Stale
Miscellaneous Persistent Warning
Warning: 246 - "Embedded Warning" "sat, 05 Oct 2019 10:47:47 GMT"
Warning: 199 -"Miscellaneous warning" "sun, 18 Oct 2015 07:28:00 GMT"
Supported Browsers: The browsers supported by HTTP headers Warning are listed below:
- Google Chrome
- Internet Explorer