summaryrefslogtreecommitdiff
path: root/modules/http/http_protocol.c
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2005-07-01 19:59:59 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2005-07-01 19:59:59 +0000
commitd90cbe8650a35057be3b3645f6c65d4fd08e3b08 (patch)
tree9798ec38081693dbd00ae4171f3150abb3bde6cf /modules/http/http_protocol.c
parent025c799a796a35567dd30837b6899257fee608ee (diff)
downloadhttpd-d90cbe8650a35057be3b3645f6c65d4fd08e3b08.tar.gz
Plug AllowTrace extended|on|off into proxy and http core.
It still is not 'correct' until REQUEST_CHUNKED_PASS is reimplemented and passes some chunk headers, since we aren't echoing the entire request. But it gets me further on testing 1.3 -> 2.0 -> 2.1 -> 2.0 -> 1.3 proxy behaviors. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@208787 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http/http_protocol.c')
-rw-r--r--modules/http/http_protocol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index d4b0429f52..1ee501aea9 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -754,6 +754,9 @@ static char *make_allow(request_rec *r)
apr_int64_t mask;
apr_array_header_t *allow = apr_array_make(r->pool, 10, sizeof(char *));
apr_hash_index_t *hi = apr_hash_first(r->pool, methods_registry);
+ /* For TRACE below */
+ core_server_config *conf =
+ ap_get_module_config(r->server->module_config, &core_module);
mask = r->allowed_methods->method_mask;
@@ -771,8 +774,9 @@ static char *make_allow(request_rec *r)
}
}
- /* TRACE is always allowed */
- *(const char **)apr_array_push(allow) = "TRACE";
+ /* TRACE is tested on a per-server basis */
+ if (conf->trace_enable != AP_TRACE_DISABLE)
+ *(const char **)apr_array_push(allow) = "TRACE";
list = apr_array_pstrcat(r->pool, allow, ',');