Max-Forwards

The HTTP Max-Forwards request header is used with the TRACE method to limit the number of nodes (usually proxies) that the request goes through. Its value is an integer indicating the maximum amount of nodes it must visit. At each node, the value is decremented and the TRACE request is forwarded to the next node until the destination is reached or the received value of Max-Forwards is zero. The request is then sent back (excluding sensitive headers where appropriate) as the body of a 200 response. This allows the client to see what is being received at the other end of the request chain (the Via header is of particular interest) for testing or diagnostic purposes.

If the Max-Forwards header is not present in a TRACE request, a node will assume that there is no maximum number of forwards.

Header type Request header
Forbidden header name No

Syntax

http
Max-Forwards: <integer>

Examples

http
Max-Forwards: 0
Max-Forwards: 10

Specifications

Specification
HTTP Semantics
# field.max-forwards

Browser compatibility

This feature is neither targeted at, nor implemented in, browsers.

See also