]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Minor cleanup - use NOERRNO logging, more proper body test and
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 6 Jul 2005 02:51:54 +0000 (02:51 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 6 Jul 2005 02:51:54 +0000 (02:51 +0000)
  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

src/main/http_protocol.c
src/modules/proxy/mod_proxy.c

index fac36529aade56db6c6a30386a7a674a9938fb02..48207e84cb3a66a052d5bc7156fa377cb8b09f30 100644 (file)
@@ -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;
index 691b303c8c8e46dfaff1886f78f78c9ad9e42c28..342e5d147a4db5fc8f4c1207f06b30035e126ecf 100644 (file)
@@ -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;
         }