TRACE and Max-Forwards

Here are the proposed changes to the TRACE method and operation.
It is a context diff of the changes necessary to complete the TRACE
method for HTTP/1.1.

This is actually an old topic (discussed last November) but this is
the first time that the changes have been put into real words.

.....Roy
===================================================================
*** draft-ietf-http-v11-spec-01.txt	Mon Feb 12 16:37:14 1996
--- trace.txt	Tue Apr  2 18:03:35 1996
***************
*** 1657,1660 ****
--- 1657,1661 ----
                        | Host                     ; Section 10.22
                        | If-Modified-Since        ; Section 10.23
+                       | Max-Forwards             ; Section 10.yy
                        | Proxy-Authorization      ; Section 10.31
                        | Range                    ; Section 10.33
***************
*** 2397,2409 ****
  8.12  TRACE
  
!    The TRACE method requests that the server identified by the 
!    Request-URI reflect whatever is received back to the client as the 
!    entity body of the response. In this way, the client can see what 
!    is being received at the other end of the request chain, and may 
!    use this data for testing or diagnostic information.
  
!    If successful, the response should contain the entire, unedited 
!    request message in the entity body, with a Content-Type of 
!    "message/http", "application/http", or "text/plain". Responses to 
!    this method are not cachable.
  
--- 2398,2422 ----
  8.12  TRACE
  
!    The TRACE method is used to invoke a remote, application-layer
!    loopback of the request message.  The final recipient of the request
!    should reflect the message received back to the client as the
!    entity body of a 200 (OK) response.  The final recipient is either
!    the origin server or the first proxy or gateway to receive a
!    Max-Forwards value of zero (0) in the request (see Section 10.yy).
  
!    A TRACE request must not include an entity body and must include a
!    Content-Length header field with a value of zero (0).
  
+    TRACE allows the client to see what is being received at the other
+    end of the request chain and use that data for testing or diagnostic
+    information.  The value of the Via header field (Section 10.xx) is of
+    particular interest, since it acts as a trace of the request chain.
+    Use of the Max-Forwards header field allows the client to limit the
+    length of the request chain, which is useful for testing a chain of
+    proxies forwarding messages in an infinite loop.
+ 
+    If successful, the response should contain the entire request message
+    in the entity body, with a Content-Type of "message/http",
+    "application/http", or "text/plain".  Responses to this method must
+    not be cached.
+ 
***************
*** 3891,3893 ****
--- 3904,3931 ----
  
+ 10.yy  Max-Forwards
+ 
+    The Max-Forwards general-header field may be used with the TRACE
+    method (Section 8.12) to limit the number of times that a proxy or
+    gateway can forward the request to the next inbound server.  This can
+    be useful when the client is attempting to trace a request chain
+    which appears to be failing or looping in mid-chain.
+ 
+        Max-Forwards   = "Max-Forwards" ":" 1*DIGIT
+ 
+    The Max-Forwards value is a decimal integer indicating the remaining
+    number of times this request message may be forwarded.
+ 
+    Each proxy or gateway recipient of a TRACE request containing a
+    Max-Forwards header field should check and update its value prior to
+    forwarding the request.  If the received value is zero (0), the
+    recipient should not forward the request; instead, it should respond
+    as the final recipient with a 200 response containing the received
+    request message as the response entity body (as described in
+    Section 8.12).  If the received Max-Forwards value is greater than
+    zero, then the forwarded message should contain an updated
+    Max-Forwards field with a value decremented by one (1).
+ 
+    The Max-Forwards header field should be ignored for all other methods
+    defined by this specification and for any extension methods for which
+    it is not explicitly referred to as part of that method definition.
+  

Received on Tuesday, 2 April 1996 18:20:17 UTC