]> granicus.if.org Git - apache/commitdiff
More trace logging
authorStefan Fritsch <sf@apache.org>
Sun, 20 Jun 2010 16:17:23 +0000 (16:17 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 20 Jun 2010 16:17:23 +0000 (16:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956374 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_filters.c
modules/http/http_request.c
server/request.c

index 4ab767a97c5fbe7dbb238e9e3dc96208162e3a21..0533c803c87c7243c69672201400f9c1a9791979 100644 (file)
@@ -809,7 +809,7 @@ static apr_status_t send_all_header_fields(header_struct *h,
                       "Headers sent to client:");
         t_elt = (const apr_table_entry_t *)(elts->elts);
         do {
-            ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "%s: %s",
+            ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "  %s: %s",
                           ap_escape_logitem(r->pool, t_elt->key),
                           ap_escape_logitem(r->pool, t_elt->val));
             t_elt++;
index f17983303e4ee2a819992e208c2f662e84d42df6..a2d224effd33f34ae4892a9f67ef4881a1703208 100644 (file)
@@ -292,6 +292,19 @@ void ap_process_async_request(request_rec *r)
         ap_time_process_request(r->connection->sbh, START_PREQUEST);
     }
 
+    if (APLOGrtrace4(r)) {
+        int i;
+        const apr_array_header_t *t_h = apr_table_elts(r->headers_in);
+        const apr_table_entry_t *t_elt = (apr_table_entry_t *)t_h->elts;
+        ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
+                      "Headers received from client:");
+        for (i = 0; i < t_h->nelts; i++, t_elt++) {
+            ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "  %s: %s",
+                          ap_escape_logitem(r->pool, t_elt->key),
+                          ap_escape_logitem(r->pool, t_elt->val));
+        }
+    }
+
 #if APR_HAS_THREADS
     apr_thread_mutex_create(&r->invoke_mtx, APR_THREAD_MUTEX_DEFAULT, r->pool);
     apr_thread_mutex_lock(r->invoke_mtx);
index 9a9b97521c687391215dc0bdbb3c6a92629a36ff..2c414e231a9cc1e0efe1cdba65627b1e66324376 100644 (file)
@@ -99,6 +99,9 @@ static int decl_die(int status, const char *phase, request_rec *r)
         return HTTP_INTERNAL_SERVER_ERROR;
     }
     else {
+        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+                      "auth phase '%s' gave status %d: %s", phase,
+                      status, r->uri);
         return status;
     }
 }
@@ -224,6 +227,12 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
                     return decl_die(access_status, "check authorization", r);
                 }
             }
+            else {
+                    ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+                        "request authorized without authentication by "
+                        "access_checker hook and 'Satisfy any': %s",
+                        r->uri);
+            }
             break;
         }
 
@@ -238,6 +247,8 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
     }
 
     if ((access_status = ap_run_fixups(r)) != OK) {
+        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "fixups hook gave %d: %s",
+                      access_status, r->uri);
         return access_status;
     }