Search code examples
resthttphateoas

Should a TRACE request contain a message body or not?


HTTPbis section 7.8 describes the expectations of a TRACE request.

A TRACE request MUST NOT include a message-body. [...] the response SHOULD have a Content-Type of "message/http" (see Section 10.3.1 of [Part1]) and contain a message-body that encloses a copy of the entire request message.

To me it seems to be contradicting itself indicating that there MUST NOT be a message-body, but that there should be a message-body enclosing the entire request -- How is this handled in practice?


Solution

  • The actual spec is RFC 7231 (https://greenbytes.de/tech/webdav/rfc7231.html#rfc.section.4.3.8).

    WRT question: one statement is about the request, the other is about the response.