]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Change priority of proxy auth and extacl provided username in login=*:pass
authorhno <>
Mon, 19 Nov 2007 05:00:58 +0000 (05:00 +0000)
committerhno <>
Mon, 19 Nov 2007 05:00:58 +0000 (05:00 +0000)
It's quite useful to be able to manipulate the forwarded username when using
login=*:pass together with authentication.

src/http.cc

index 3f3cc40797b89e8ed9d79b5c76e097fd0aa38387..41913774a451ff573978639b771d860714c6fafb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.540 2007/11/15 23:33:05 wessels Exp $
+ * $Id: http.cc,v 1.541 2007/11/18 22:00:58 hno Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -1394,10 +1394,10 @@ HttpStateData::httpBuildRequestHeader(HttpRequest * request,
             char loginbuf[256];
             const char *username = "-";
 
-            if (orig_request->auth_user_request)
-                username = orig_request->auth_user_request->username();
-            else if (orig_request->extacl_user.size())
+            if (orig_request->extacl_user.size())
                 username = orig_request->extacl_user.buf();
+            else if (orig_request->auth_user_request)
+                username = orig_request->auth_user_request->username();
 
             snprintf(loginbuf, sizeof(loginbuf), "%s%s", username, orig_request->peer_login + 1);