]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Debug enhancements for rewrite helper user
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 28 Jul 2011 13:01:05 +0000 (01:01 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 28 Jul 2011 13:01:05 +0000 (01:01 +1200)
src/redirect.cc

index 4d6372ff8ff576c9bcb78c3a38f423c1f9a7da16..6b827ef532deb2bce1d908a63840629af905e529 100644 (file)
@@ -148,22 +148,28 @@ redirectStart(ClientHttpRequest * http, RH * handler, void *data)
         r->client_addr.SetNoAddr();
     r->client_ident = NULL;
 #if USE_AUTH
-    if (http->request->auth_user_request != NULL)
+    if (http->request->auth_user_request != NULL) {
         r->client_ident = http->request->auth_user_request->username();
-    else
+        debugs(61, 5, HERE << "auth-user=" << (r->client_ident?r->client_ident:"NULL"));
+    }
 #endif
-        if (http->request->extacl_user.defined()) {
-            r->client_ident = http->request->extacl_user.termedBuf();
-        }
 
-    if (!r->client_ident && conn != NULL && conn->clientConnection != NULL && conn->clientConnection->rfc931[0])
+    if (!r->client_ident && http->request->extacl_user.defined()) {
+        r->client_ident = http->request->extacl_user.termedBuf();
+        debugs(61, 5, HERE << "acl-user=" << (r->client_ident?r->client_ident:"NULL"));
+    }
+
+    if (!r->client_ident && conn != NULL && conn->clientConnection != NULL && conn->clientConnection->rfc931[0]) {
         r->client_ident = conn->clientConnection->rfc931;
+        debugs(61, 5, HERE << "ident-user=" << (r->client_ident?r->client_ident:"NULL"));
+    }
 
 #if USE_SSL
 
-    if (!r->client_ident && conn != NULL && Comm::IsConnOpen(conn->clientConnection))
+    if (!r->client_ident && conn != NULL && Comm::IsConnOpen(conn->clientConnection)) {
         r->client_ident = sslGetUserEmail(fd_table[conn->clientConnection->fd].ssl);
-
+        debugs(61, 5, HERE << "ssl-user=" << (r->client_ident?r->client_ident:"NULL"));
+    }
 #endif
 
     if (!r->client_ident)