--------------------- PatchSet 1967 Date: 2005/10/23 08:48:50 Author: hno Branch: negotiate Tag: (none) Log: Add that missing header on the final response after successful/failed authentication. Members: src/auth/negotiate/auth_negotiate.cc:1.1.2.2->1.1.2.3 src/auth/negotiate/auth_negotiate.h:1.1.2.1->1.1.2.2 Index: squid3/src/auth/negotiate/auth_negotiate.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/auth/negotiate/auth_negotiate.cc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/auth/negotiate/auth_negotiate.cc 23 Oct 2005 08:46:18 -0000 1.1.2.2 +++ squid3/src/auth/negotiate/auth_negotiate.cc 23 Oct 2005 08:48:50 -0000 1.1.2.3 @@ -1,6 +1,6 @@ /* - * $Id: auth_negotiate.cc,v 1.1.2.2 2005/10/23 08:46:18 serassio Exp $ + * $Id: auth_negotiate.cc,v 1.1.2.3 2005/10/23 08:48:50 hno Exp $ * * DEBUG: section 29 Negotiate Authenticator * AUTHOR: Robert Collins, Henrik Nordstrom, Francesco Chemolli @@ -263,6 +263,25 @@ return -2; } +/* add the [proxy]authorisation header */ +void +AuthNegotiateUserRequest::addHeader(HttpReply * rep, int accel) +{ + http_hdr_type type; + + if (!server_blob) + return; + + /* don't add to authentication error pages */ + + if ((!accel && rep->sline.status == HTTP_PROXY_AUTHENTICATION_REQUIRED) + || (accel && rep->sline.status == HTTP_UNAUTHORIZED)) + return; + + httpHeaderPutStrf(&rep->header, type, "Negotiate %s", server_blob); + safe_free(server_blob); +} + void AuthNegotiateConfig::fixHeader(auth_user_request_t *auth_user_request, HttpReply *rep, http_hdr_type type, HttpRequest * request) { Index: squid3/src/auth/negotiate/auth_negotiate.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/auth/negotiate/auth_negotiate.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid3/src/auth/negotiate/auth_negotiate.h 22 Oct 2005 18:30:59 -0000 1.1.2.1 +++ squid3/src/auth/negotiate/auth_negotiate.h 23 Oct 2005 08:48:50 -0000 1.1.2.2 @@ -63,6 +63,7 @@ virtual AuthUser *user() {return _theUser;} virtual const AuthUser *user() const {return _theUser;} + virtual void addHeader(HttpReply * rep, int accel); virtual void user (AuthUser *aUser) {_theUser=dynamic_cast(aUser);}