diff -ur squid-2.7.STABLE6/src/cf.data.pre squid-2.7.STABLE6-client-cc-patch/src/cf.data.pre
--- squid-2.7.STABLE6/src/cf.data.pre	2009-02-02 03:28:55.000000000 -0800
+++ squid-2.7.STABLE6-client-cc-patch/src/cf.data.pre	2009-04-30 17:49:47.000000000 -0700
@@ -3296,6 +3296,18 @@
 	replies as required by RFC2616.
 DOC_END
 
+NAME: replace_client_cc
+COMMENT: on|off
+TYPE: onoff
+DEFAULT: off
+LOC: Config.onoff.replace_client_cc
+DOC_START
+  If set, Squid will look for a Client-Cache-Control: header in the
+  response and, if set, replace the existing Cache-Control: header
+  with its contents when sending the response to the client. The
+  original Cache-Control: header data will be honored internally, however.
+DOC_END
+
 NAME: cache_vary
 TYPE: onoff
 DEFAULT: on
Only in squid-2.7.STABLE6-client-cc-patch/src: cf.data.pre.orig
diff -ur squid-2.7.STABLE6/src/client_side.c squid-2.7.STABLE6-client-cc-patch/src/client_side.c
--- squid-2.7.STABLE6/src/client_side.c	2008-10-06 14:27:44.000000000 -0700
+++ squid-2.7.STABLE6-client-cc-patch/src/client_side.c	2009-04-30 17:49:47.000000000 -0700
@@ -1938,6 +1938,29 @@
     if (request->flags.chunked_response) {
 	httpHeaderPutStr(hdr, HDR_TRANSFER_ENCODING, "chunked");
     }
+
+/* cwoodfield's hack here to support Client-Cache-Control:    
+ * will replace contents of Cache-Control: with contents of   
+ * Client-Cache-Control if header is present and replace_client_cc
+ * is enabled.
+ */
+  if (Config.onoff.replace_client_cc && http->entry) {
+    String hdrClientCc = httpHeaderGetList(hdr, HDR_CLIENT_CACHE_CONTROL);
+    if (strBuf(hdrClientCc)) {
+      debug(33,3) ("clientBuildReplyHeader: found Client-Cache-Control, value %s\n", strBuf(hdrClientCc));
+      /* Parse the client Client-Cache-Control: string */
+      HttpHdrCc *clientCc = httpHdrCcParseCreate(&hdrClientCc);
+      assert(clientCc);
+      /* replace Cache-Control: */
+      httpHeaderPutCc(hdr, clientCc);
+      /* Then delete Client-Cache-Control: */
+      (void) httpHeaderDelById(hdr, HDR_CLIENT_CACHE_CONTROL);
+      /* Cleanup */
+      httpHdrCcDestroy(clientCc);
+      stringClean(&hdrClientCc);
+    }
+  }
+
     /* Append Via */
     if (Config.onoff.via && http->entry) {
 	LOCAL_ARRAY(char, bbuf, MAX_URL + 32);
Only in squid-2.7.STABLE6-client-cc-patch/src: client_side.c.orig
diff -ur squid-2.7.STABLE6/src/enums.h squid-2.7.STABLE6-client-cc-patch/src/enums.h
--- squid-2.7.STABLE6/src/enums.h	2008-09-24 19:33:37.000000000 -0700
+++ squid-2.7.STABLE6-client-cc-patch/src/enums.h	2009-04-30 17:49:47.000000000 -0700
@@ -202,6 +202,7 @@
     HDR_ALLOW,
     HDR_AUTHORIZATION,
     HDR_CACHE_CONTROL,
+    HDR_CLIENT_CACHE_CONTROL,
     HDR_CONNECTION,
     HDR_CONTENT_BASE,
     HDR_CONTENT_DISPOSITION,
diff -ur squid-2.7.STABLE6/src/HttpHeader.c squid-2.7.STABLE6-client-cc-patch/src/HttpHeader.c
--- squid-2.7.STABLE6/src/HttpHeader.c	2008-09-24 19:33:37.000000000 -0700
+++ squid-2.7.STABLE6-client-cc-patch/src/HttpHeader.c	2009-04-30 17:49:47.000000000 -0700
@@ -75,6 +75,7 @@
     {"Allow", HDR_ALLOW, ftStr},
     {"Authorization", HDR_AUTHORIZATION, ftStr},	/* for now */
     {"Cache-Control", HDR_CACHE_CONTROL, ftPCc},
+    {"Client-Cache-Control", HDR_CLIENT_CACHE_CONTROL, ftStr},
     {"Connection", HDR_CONNECTION, ftStr},
     {"Content-Base", HDR_CONTENT_BASE, ftStr},
     {"Content-Disposition", HDR_CONTENT_DISPOSITION, ftStr},
@@ -153,6 +154,7 @@
     HDR_ACCEPT_CHARSET, HDR_ACCEPT_ENCODING, HDR_ACCEPT_LANGUAGE,
     HDR_ACCEPT_RANGES, HDR_ALLOW,
     HDR_CACHE_CONTROL,
+    HDR_CLIENT_CACHE_CONTROL,
     HDR_CONTENT_ENCODING,
     HDR_CONTENT_LANGUAGE,
     HDR_CONNECTION,
@@ -180,7 +182,7 @@
 /* general-headers */
 static http_hdr_type GeneralHeadersArr[] =
 {
-    HDR_CACHE_CONTROL, HDR_CONNECTION, HDR_DATE, HDR_PRAGMA,
+    HDR_CACHE_CONTROL, HDR_CLIENT_CACHE_CONTROL, HDR_CONNECTION, HDR_DATE, HDR_PRAGMA,
     HDR_TRANSFER_ENCODING,
     HDR_TRAILER,
     HDR_UPGRADE,
diff -ur squid-2.7.STABLE6/src/structs.h squid-2.7.STABLE6-client-cc-patch/src/structs.h
--- squid-2.7.STABLE6/src/structs.h	2008-09-24 19:33:37.000000000 -0700
+++ squid-2.7.STABLE6-client-cc-patch/src/structs.h	2009-04-30 17:50:25.000000000 -0700
@@ -691,6 +691,7 @@
 	int global_internal_static;
 	int httpd_suppress_version_string;
 	int via;
+  int replace_client_cc;
 	int ignore_ims_on_miss;
 	int check_hostnames;
 	int allow_underscore;
Only in squid-2.7.STABLE6-client-cc-patch/src: structs.h.orig

