]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Don't cache replies with Vary headers
authorwessels <>
Thu, 21 May 1998 05:35:01 +0000 (05:35 +0000)
committerwessels <>
Thu, 21 May 1998 05:35:01 +0000 (05:35 +0000)
src/HttpHeader.cc
src/enums.h
src/http.cc

index cf7dae6467d75ae1d10fb47a5a0028180a431185..d255a5d150f600c06a952edb7934866b08a45711 100644 (file)
@@ -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
 };
index 240799ab2409a2a1ccf2b733697dc5917554dad2..12e3e4576c83736b684efba90d4cca3aca6e0452 100644 (file)
@@ -221,6 +221,7 @@ typedef enum {
     HDR_TITLE,
     HDR_UPGRADE,
     HDR_USER_AGENT,
+    HDR_VARY,
     HDR_VIA,
     HDR_WARNING,
     HDR_WWW_AUTHENTICATE,
index 7a05d04991dadf3eb46a67f41a8b0136bf571078..ac63dfbf5c772e85960c8c2be0d5a81928df139d 100644 (file)
@@ -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 */