diff --git a/web/http/methods/TRACE.xml b/web/http/methods/TRACE.xml new file mode 100644 index 0000000..10d6739 --- /dev/null +++ b/web/http/methods/TRACE.xml @@ -0,0 +1,54 @@ + + + + + TRACE + + + + +
+ + +

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
+
+ +
+ + diff --git a/web/http/server.xml b/web/http/server.xml index 4576f0f..17c9eed 100644 --- a/web/http/server.xml +++ b/web/http/server.xml @@ -132,8 +132,9 @@

If the authority-form is used with a method besides CONNECT, emit 405 (Method Not Allowed).

If there's no need to implement these, return 501 (Not Implemented).

-

Message Forwarding

-

If the server is forwarding the message to another node instead of handling it as an origin, it must implement the Via and Max-Forwards headers.

+

Route Request-URI

+

HTTP servers may act as intermediaries and forward the HTTP message to another server; if and where the message is forwarded to may vary by the scheme, authority, or path component of the URI.

+

If the server is forwarding the message to another node instead of handling it as an origin, it must implement the Via and Max-Forwards headers. If Max-Forwards: 0 is specified for a TRACE or OPTIONS request, the server must not forward the message, but must act as the origin server.

Recall that connection headers (described above) cannot be forwarded since they convey information about the particular connection between nodes.

The server must also remove the Connection header as described above.