Index: squid/src/authenticate.c diff -c squid/src/authenticate.c:1.36.2.17 squid/src/authenticate.c:1.36.2.19 *** squid/src/authenticate.c:1.36.2.17 Fri Mar 25 19:50:51 2005 --- squid/src/authenticate.c Fri Sep 16 05:09:35 2005 *************** *** 502,507 **** --- 502,517 ---- if (*auth_user_request == NULL) { debug(28, 9) ("authenticateAuthenticate: This is a new checklist test on FD:%d\n", conn ? conn->fd : -1); + if (proxy_auth && !request->auth_user_request && conn && conn->auth_user_request) { + int id = authenticateAuthSchemeId(proxy_auth) + 1; + if (!conn->auth_user_request->auth_user || conn->auth_user_request->auth_user->auth_module != id) { + debug(28, 1) ("authenticateAuthenticate: Unexpected change of authentication scheme from '%s' to '%s' (client %s)\n", + authscheme_list[conn->auth_user_request->auth_user->auth_module - 1].typestr, proxy_auth, inet_ntoa(src_addr)); + authenticateAuthUserRequestUnlock(conn->auth_user_request); + conn->auth_user_request = NULL; + conn->auth_type = AUTH_UNKNOWN; + } + } if ((!request->auth_user_request) && (!conn || conn->auth_type == AUTH_UNKNOWN)) { /* beginning of a new request check */