Commit 6efaa4ed authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Introduce TraceEnable [on|off|extended], fixes non-compliance
  in mod_proxy which accepted request bodies with TRACE requests.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@202263 13f79535-47bb-0310-9956-ffa450edef68
parent bdf32690
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -190,6 +190,8 @@

      <li><a href="#timeout">TimeOut</a></li>

      <li><a href="#timeout">TraceEnable</a></li>

      <li><a href="#usecanonicalname">UseCanonicalName</a></li>

      <li><a href="#user">User</a></li>
@@ -3972,6 +3974,40 @@ Syntax OK
    the timer is not reset when a packet is sent. 
    <hr />

    <h2><a id="traceenable"
    name="traceenable">TraceEnable</a></h2>
    <a href="directive-dict.html#Syntax"
    rel="Help"><strong>Syntax:</strong></a> TraceEnable
    <em>[on|off|extended]</em><br />
     <a href="directive-dict.html#Default"
    rel="Help"><strong>Default:</strong></a> <code>TraceEnable
    on</code><br />
     <a href="directive-dict.html#Context"
    rel="Help"><strong>Context:</strong></a> server config<br />
     <a href="directive-dict.html#Status"
    rel="Help"><strong>Status:</strong></a> core (Windows,
    NetWare)<br />
     <strong>Compatibility:</strong> Available only in Apache 1.3.34
    and later 

    <p>This directive overrides the behavior of TRACE for both
    the core server and mod_proxy.  The default <code>TraceEnable 
    on</code> permits TRACE requests per RFC 2616, which disallows
    any request body to accompany the request.  <code>TraceEnable
    off</code> causes the core server and mod_proxy to return
    a 405 FORBIDDEN error to the client.</p>

    <p>Finally, for testing and diagnostic purposes only, request
    bodies may be allowed using the non-compliant <code>TraceEnable 
    extended</code> directive.  The core (as an origin server) will
    restrict the request body to 64k (plus 8k for chunk headers if
    Transfer-Encoding: chunked is used).  The core will reflect the
    full headers and all chunk headers with the request body.  As a
    proxy server, the request body is not restricted to 64k.  At this
    time the Apache 1.3 mod_proxy does not permit chunked request 
    bodies for any request, including the extended TRACE request.</p>
    <hr />

    <h2><a id="usecanonicalname"
    name="usecanonicalname">UseCanonicalName directive</a></h2>

+2 −0
Original line number Diff line number Diff line
@@ -558,6 +558,8 @@

      <li><a href="core.html#timeout">TimeOut</a></li>

      <li><a href="core.html#timeout">TraceEnable</a></li>

      <li><a
      href="mod_log_config.html#transferlog">TransferLog</a></li>

+7 −0
Original line number Diff line number Diff line
Changes with Apache 1.3.34

  *) Added TraceEnable [on|off|extended] per-server directive to alter
     the behavior of the TRACE method.  This addresses a flaw in proxy
     conformance to RFC 2616 - previously the proxy server would accept
     a TRACE request body although the RFC prohibited it.  The default
     remains 'TraceEnable on'.
     [William Rowe]

  *) mod_digest: Fix another nonce string calculation issue.
     [Eric Covener]

+2 −1
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@
 * 19990320.16          - ap_escape_errorlog_item()
 * 19990320.17          - ap_auth_nonce() and ap_auth_nonce added
 *                        in core_dir_config.
 * 19990320.18          - trace_enable member added to core server_config
 */

#define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
@@ -210,7 +211,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 19990320
#endif
#define MODULE_MAGIC_NUMBER_MINOR 17                    /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 18                    /* 0...n */

/* Useful for testing for features. */
#define AP_MODULE_MAGIC_AT_LEAST(major,minor)		\
+10 −0
Original line number Diff line number Diff line
@@ -344,8 +344,18 @@ typedef struct {
    int recursion_limit_set; /* boolean */
    int redirect_limit;      /* maximum number of internal redirects */
    int subreq_limit;        /* maximum nesting level of subrequests */

    /* TRACE control */
    int trace_enable;        /* see AP_TRACE_ below */

} core_server_config;

/* trace_enable options */
#define AP_TRACE_UNSET    -1
#define AP_TRACE_DISABLE   0
#define AP_TRACE_ENABLE    1
#define AP_TRACE_EXTENDED  2

/* for http_config.c */
CORE_EXPORT(void) ap_core_reorder_directories(pool *, server_rec *);

Loading