From: wessels <> Date: Thu, 21 May 1998 05:35:01 +0000 (+0000) Subject: Don't cache replies with Vary headers X-Git-Tag: SQUID_3_0_PRE1~3302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=783e46991cc311c069939f9191a0b5e71bbe83ef;p=thirdparty%2Fsquid.git Don't cache replies with Vary headers --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index cf7dae6467..d255a5d150 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.33 1998/05/11 18:44:26 rousskov Exp $ + * $Id: HttpHeader.cc,v 1.34 1998/05/20 23:35:03 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -118,6 +118,7 @@ static const HttpHeaderFieldAttrs HeadersAttrs[] = {"Title", HDR_TITLE, ftStr}, {"Upgrade", HDR_UPGRADE, ftStr}, /* for now */ {"User-Agent", HDR_USER_AGENT, ftStr}, + {"Vary", HDR_VARY, ftStr}, /* for now */ {"Via", HDR_VIA, ftStr}, /* for now */ {"Warning", HDR_WARNING, ftStr}, /* for now */ {"WWW-Authenticate", HDR_WWW_AUTHENTICATE, ftStr}, @@ -145,7 +146,8 @@ static http_hdr_type ListHeadersArr[] = /* HDR_IF_MATCH, HDR_IF_NONE_MATCH, */ HDR_LINK, HDR_PRAGMA, /* HDR_TRANSFER_ENCODING, */ - HDR_UPGRADE, /* HDR_VARY, */ + HDR_UPGRADE, + HDR_VARY, HDR_VIA, /* HDR_WARNING, */ HDR_WWW_AUTHENTICATE, @@ -178,6 +180,7 @@ static http_hdr_type ReplyHeadersArr[] = HDR_CONTENT_MD5, HDR_CONTENT_TYPE, HDR_LOCATION, HDR_MAX_FORWARDS, HDR_MIME_VERSION, HDR_PUBLIC, HDR_RETRY_AFTER, HDR_SERVER, HDR_SET_COOKIE, + HDR_VARY, HDR_WARNING, HDR_PROXY_CONNECTION, HDR_X_CACHE, HDR_X_CACHE_LOOKUP }; diff --git a/src/enums.h b/src/enums.h index 240799ab24..12e3e4576c 100644 --- a/src/enums.h +++ b/src/enums.h @@ -221,6 +221,7 @@ typedef enum { HDR_TITLE, HDR_UPGRADE, HDR_USER_AGENT, + HDR_VARY, HDR_VIA, HDR_WARNING, HDR_WWW_AUTHENTICATE, diff --git a/src/http.cc b/src/http.cc index 7a05d04991..ac63dfbf5c 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.271 1998/05/12 04:11:16 wessels Exp $ + * $Id: http.cc,v 1.272 1998/05/20 23:35:01 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -240,6 +240,8 @@ httpCachableReply(HttpStateData * httpState) /* With new headers the above stripping should be easy to do? @?@ */ if (httpHeaderHas(hdr, HDR_SET_COOKIE)) return 0; + if (httpHeaderHas(hdr, HDR_VARY)) + return 0; switch (httpState->entry->mem_obj->reply->sline.status) { /* Responses that are cacheable */ case 200: /* OK */