--------------------- PatchSet 11779 Date: 2007/11/26 11:04:30 Author: adrian Branch: SQUID_2_6 Tag: (none) Log: Author: hno Patchset 11743 (HEAD): Change priority of proxy auth and extacl provided username in login=*:pass It's quite useful to be able to manipulate the forwarded username when using login=*:pass together with authentication. Members: src/http.c:1.419.2.10->1.419.2.11 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid/squid/src/http.c,v retrieving revision 1.419.2.10 retrieving revision 1.419.2.11 diff -u -r1.419.2.10 -r1.419.2.11 --- squid/src/http.c 26 Nov 2007 10:37:33 -0000 1.419.2.10 +++ squid/src/http.c 26 Nov 2007 11:04:30 -0000 1.419.2.11 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.419.2.10 2007/11/26 10:37:33 adrian Exp $ + * $Id: http.c,v 1.419.2.11 2007/11/26 11:04:30 adrian Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -1256,10 +1256,10 @@ /* Special mode, to pass the username to the upstream cache */ char loginbuf[256]; const char *username = "-"; - if (orig_request->auth_user_request) - username = authenticateUserRequestUsername(orig_request->auth_user_request); - else if (orig_request->extacl_user) + if (orig_request->extacl_user) username = orig_request->extacl_user; + else if (orig_request->auth_user_request) + username = authenticateUserRequestUsername(orig_request->auth_user_request); snprintf(loginbuf, sizeof(loginbuf), "%s%s", username, orig_request->peer_login + 1); httpHeaderPutStrf(hdr_out, HDR_PROXY_AUTHORIZATION, "Basic %s", base64_encode(loginbuf));