From: Amos Jeffries Date: Thu, 28 Jul 2011 13:01:05 +0000 (+1200) Subject: Debug enhancements for rewrite helper user X-Git-Tag: take08~55^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d54f7a2cc48db9e649ed70268ee268ad67eeaafc;p=thirdparty%2Fsquid.git Debug enhancements for rewrite helper user --- diff --git a/src/redirect.cc b/src/redirect.cc index 4d6372ff8f..6b827ef532 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -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)