Max-Forwards header
The HTTPMax-Forwardsrequest header is used with theTRACE andOPTIONS method to limit the number of nodes (usuallyproxies) that the request goes through.
Its value is an integer indicating themaximum amount of nodes it must visit.At each node, the value is decremented and the request is forwarded to the next node until the destination is reached or the received value ofMax-Forwards is zero.The request is then sent back (excluding sensitive headers where appropriate) as the body of a200 response.This allows the client to see what is being received at the other end of the request chain (theVia header is of particular interest) for testing or diagnostic purposes.
If theMax-Forwards header is not present in aTRACE orOPTIONS request, a node will assume that there is no maximum number of forwards.
| Header type | Request header |
|---|---|
| Forbidden request header | No |
In this article
Syntax
Max-Forwards: <integer>Examples
Max-Forwards: 0Max-Forwards: 10Specifications
| Specification |
|---|
| HTTP Semantics> # field.max-forwards> |
Browser compatibility
This feature is neither targeted at, nor implemented in, browsers.
See also
TRACEmethodOPTIONSmethod405 Method Not Allowed