From 9d0ed876d3cdc229268dffc26f6db976f090cd68 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 14 Mar 2008 17:45:16 +1300 Subject: [PATCH] Bug #1634: no Proxy-Authenticate header in 407 responses This is a temporary fix partially reversing the fix for bug 1923. It is likely to be superseded in future releases. It is intended only to restore critical previous behaviour to squid as a short-term measure. --- src/HttpHeader.cc | 2 ++ src/HttpHeader.h | 4 +--- src/client_side_reply.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index a836df8de5..d6f52fb9f7 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1806,5 +1806,7 @@ HttpHeader::removeConnectionHeaderEntries() } if (headers_deleted) refreshMask(); + + delById(HDR_CONNECTION); } } diff --git a/src/HttpHeader.h b/src/HttpHeader.h index 14a4077a1b..e4eb4c4357 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -247,15 +247,13 @@ public: int hasListMember(http_hdr_type id, const char *member, const char separator) const; int hasByNameListMember(const char *name, const char *member, const char separator) const; void removeHopByHopEntries(); + void removeConnectionHeaderEntries(); /* protected, do not use these, use interface functions instead */ Vector entries; /* parsed fields in raw format */ HttpHeaderMask mask; /* bit set <=> entry present */ http_hdr_owner_type owner; /* request or reply */ int len; /* length when packed, not counting terminating '\0' */ -protected: - void removeConnectionHeaderEntries(); - private: HttpHeaderEntry *findLastEntry(http_hdr_type id) const; // Make it non-copyable. Our destructor is a bit nasty... diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 4f2f417f0e..cf9e5df34e 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1214,7 +1214,7 @@ clientReplyContext::buildReplyHeader() if (is_hit) hdr->delById(HDR_SET_COOKIE); - reply->header.removeHopByHopEntries(); + reply->header.removeConnectionHeaderEntries(); // if (request->range) // clientBuildRangeHeader(http, reply); -- 2.47.2