From: William A. Rowe Jr Date: Wed, 6 Jul 2005 02:51:54 +0000 (+0000) Subject: Minor cleanup - use NOERRNO logging, more proper body test and X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=051c1a85056e2425cd810614e878c8d06d9ebd6f;p=thirdparty%2Fapache%2Fhttpd.git Minor cleanup - use NOERRNO logging, more proper body test and log origin server TRACE denied. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@209394 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/http_protocol.c b/src/main/http_protocol.c index fac36529aad..48207e84cb3 100644 --- a/src/main/http_protocol.c +++ b/src/main/http_protocol.c @@ -1687,9 +1687,12 @@ API_EXPORT(int) ap_send_http_trace(request_rec *r) conf = ap_get_module_config(r->server->module_config, &core_module); if (conf->trace_enable == AP_TRACE_DISABLE) { - ap_table_setn(r->notes, "error-notes", - "TRACE denied by server configuration"); - return HTTP_FORBIDDEN; + ap_table_setn(r->notes, "error-notes", + "TRACE forbidden by server configuration"); + ap_table_setn(r->notes, "verbose-error-to", "*"); + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, + "TRACE forbidden by server configuration"); + return HTTP_FORBIDDEN; } if (conf->trace_enable == AP_TRACE_EXTENDED) @@ -2112,7 +2115,7 @@ API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy) } if ((r->read_body == REQUEST_NO_BODY) && - (r->read_chunked || (r->remaining > 0))) { + && (r->read_length || r->read_chunked || r->remaining)) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, "%s with body is not allowed for %s", r->method, r->uri); return HTTP_REQUEST_ENTITY_TOO_LARGE; diff --git a/src/modules/proxy/mod_proxy.c b/src/modules/proxy/mod_proxy.c index 691b303c8c8..342e5d147a4 100644 --- a/src/modules/proxy/mod_proxy.c +++ b/src/modules/proxy/mod_proxy.c @@ -292,7 +292,7 @@ static int proxy_handler(request_rec *r) ap_table_setn(r->notes, "error-notes", "TRACE forbidden by server configuration"); ap_table_setn(r->notes, "verbose-error-to", "*"); - ap_log_rerror(APLOG_MARK, APLOG_ERR, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, "proxy: TRACE forbidden by server configuration"); return HTTP_FORBIDDEN; } @@ -306,7 +306,7 @@ static int proxy_handler(request_rec *r) ap_table_setn(r->notes, "error-notes", "TRACE with request body is not allowed"); ap_table_setn(r->notes, "verbose-error-to", "*"); - ap_log_rerror(APLOG_MARK, APLOG_ERR, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r, "proxy: TRACE with request body is not allowed"); return HTTP_REQUEST_ENTITY_TOO_LARGE; }