--------------------- PatchSet 7164 Date: 2005/11/05 22:56:39 Author: hno Branch: pinning Tag: (none) Log: Typos Members: src/client_side.c:1.47.2.71.2.3->1.47.2.71.2.4 src/http.c:1.17.6.32.2.2->1.17.6.32.2.3 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.47.2.71.2.3 retrieving revision 1.47.2.71.2.4 diff -u -r1.47.2.71.2.3 -r1.47.2.71.2.4 --- squid/src/client_side.c 5 Nov 2005 22:50:13 -0000 1.47.2.71.2.3 +++ squid/src/client_side.c 5 Nov 2005 22:56:39 -0000 1.47.2.71.2.4 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.47.2.71.2.3 2005/11/05 22:50:13 hno Exp $ + * $Id: client_side.c,v 1.47.2.71.2.4 2005/11/05 22:56:39 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -3999,7 +3999,7 @@ return; assert(conn->pinning.fd == -1); conn->pinning.fd = fd; - conn->pinning.host = strdup(host); + conn->pinning.host = xstrdup(host); conn->pinning.port = port; conn->pinning.pinned = 1; comm_add_close_handler(fd, clientPinnedConnectionClosed, conn); Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.17.6.32.2.2 retrieving revision 1.17.6.32.2.3 diff -u -r1.17.6.32.2.2 -r1.17.6.32.2.3 --- squid/src/http.c 5 Nov 2005 22:50:13 -0000 1.17.6.32.2.2 +++ squid/src/http.c 5 Nov 2005 22:56:42 -0000 1.17.6.32.2.3 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.17.6.32.2.2 2005/11/05 22:50:13 hno Exp $ + * $Id: http.c,v 1.17.6.32.2.3 2005/11/05 22:56:42 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -558,14 +558,18 @@ const HttpReply *rep = httpState->entry->mem_obj->reply; const HttpHeader *hdr = &rep->header; int rc; + String header; + + if (!httpState->peer) + return 1; if (!httpHeaderHas(hdr, HDR_PROXY_SUPPORT)) return 0; header = httpHeaderGetStrOrList(hdr, HDR_PROXY_SUPPORT); /* XXX This ought to be done in a case-insensitive manner */ - rc = strStr(header, "Session-Based-Authentication"); - stringClean(header); + rc = (strStr(header, "Session-Based-Authentication") != NULL); + stringClean(&header); return rc; } @@ -758,7 +762,7 @@ #endif comm_remove_close_handler(fd, httpStateFree, httpState); fwdUnregister(fd, httpState->fwd); - if (request->pinned_connection && (!httpState->peer || connection_pinning_supported(httpState))) + if (request->pinned_connection && peer_supports_connection_pinning(httpState)) clientPinConnection(request->pinned_connection, request->host, request->port, fd); else if (request->flags.accelerated && Config.Accel.single_host && Config.Accel.host) pconnPush(fd, Config.Accel.host, Config.Accel.port);