TRACE
+The TRACE method requests an application-level loop-back of the request message.
+ +Writing requests (clients)
+TRACE may be used for debugging HTTP pipelines through proxies and gateways; is not typically used for day-to-day or automated use. It may be combined with the Max-Forwards request header to troubleshoot which node in the chain is seeing what request message.
+HTTP prohibits attaching sensitive information to TRACE requests if that information cannot be disclosed in the response. Clients that must send HTTP messages with ambient authority, that cannot manage this requirement, are better off prohibiting TRACE requests altogether.
+Clients must not send a message body in a TRACE request.
+ +Reading requests (servers)
+TRACE should be handled after the request URI has been routed to a target destination, or if the Max-Forwards request header is 0.
+As a security precaution for old user agents, servers should return an error for requests containing an Origin
header should return 400 Client Error
, or otherwise deny access to the resource, unless the server can determine the response does not leak any private credentials (for example, the request does not contain any Authorization
or Cookie
headers.
Security conscerns
+Some user agents allow scripts to make requests with ambient authority, and so are sent with the Authorization
and Cookie
headers not normally accessible to the calling script. If this request is made using TRACE, these request headers could become accessible. User agents should not add the ability to send requests with ambient authority (requests made by a script should be treated differently than requests made by the user); if they must permit such requests, they must block
Overview table
+-
+
- Name +
- TRACE +
- Description +
- Requests a the request message be written back in the response body. +
- Safeness +
- Safe, Idempotent +
- Conditional fail +
- Not applicable +
- Request payload +
- Prohibited +
- Response payload +
- Required +
- Cachable +
- Never +
- Specification +
- RFC 5789: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content. 4.3.8. TRACE +