]> granicus.if.org Git - apache/commitdiff
Return METHOD_NOT_ALLOWED, not FORBIDDEN, to a TRACE request when
authorNick Kew <niq@apache.org>
Wed, 14 Feb 2007 13:34:38 +0000 (13:34 +0000)
committerNick Kew <niq@apache.org>
Wed, 14 Feb 2007 13:34:38 +0000 (13:34 +0000)
TraceEnable is Off.  This agrees with our documentation, and with
our Allow: header in response to OPTIONS.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@507526 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c
modules/proxy/mod_proxy.c

index a28fbafc1edb1b91ce75f470dfe603305ffce9b6..cee5d70cf8065fac8279d50efc8cfabb9ea199fb 100644 (file)
@@ -857,7 +857,7 @@ AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r)
     if (conf->trace_enable == AP_TRACE_DISABLE) {
         apr_table_setn(r->notes, "error-notes",
                       "TRACE denied by server configuration");
-        return HTTP_FORBIDDEN;
+        return HTTP_METHOD_NOT_ALLOWED;
     }
 
     if (conf->trace_enable == AP_TRACE_EXTENDED)
index 4f87b23299ce335f604853d222f14bba660d322b..a8b95f4365924c4d2a4b904b11dc150ff0361649 100644 (file)
@@ -744,7 +744,7 @@ static int proxy_handler(request_rec *r)
             apr_table_setn(r->notes, "verbose-error-to", "*");
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                           "proxy: TRACE forbidden by server configuration");
-            return HTTP_FORBIDDEN;
+            return HTTP_METHOD_NOT_ALLOWED;
         }
 
         /* Can't test ap_should_client_block, we aren't ready to send