--- squid-2.6.STABLE17/src/http.c 2007-11-26 13:04:30.000000000 +0200 +++ squid-2.6.STABLE17-dm1/src/http.c 2007-12-30 16:04:55.000000000 +0200 @@ -375,7 +375,11 @@ if (Config.accessList.vary_encoding && aclCheckFast(Config.accessList.vary_encoding, &checklist)) { stringClean(&request->vary_encoding); request->vary_encoding = httpHeaderGetStrOrList(&request->header, HDR_ACCEPT_ENCODING); - strCat(request->vary_encoding, ""); + /* As we already strip other encodings at output filter, we can simplify object storage too */ + if (strstr(strBuf(request->vary_encoding),"gzip")) + stringReset(&request->vary_encoding,"gzip"); + else + stringReset(&request->vary_encoding,""); } } if (strcmp(name, "*") == 0) { @@ -1168,6 +1172,11 @@ if (!opt_forwarded_for) httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e)); break; + case HDR_ACCEPT_ENCODING: + /* Strip everything other encoding, except gzip. x-gzip is equivalent of gzip */ + if (strstr(strBuf(e->value),"gzip")) + httpHeaderPutStr(hdr_out, HDR_ACCEPT_ENCODING, "gzip"); + break; case HDR_RANGE: case HDR_IF_RANGE: case HDR_REQUEST_RANGE: @@ -1315,6 +1324,7 @@ } } /* append Cache-Control, add max-age if not there already */ +#if 0 { HttpHdrCc *cc = httpHeaderGetCc(hdr_in); if (!cc) @@ -1334,6 +1344,7 @@ httpHeaderPutCc(hdr_out, cc); httpHdrCcDestroy(cc); } +#endif /* maybe append Connection: keep-alive */ if (flags.keepalive || request->flags.pinned) { if (flags.proxying) {