From cee7bb85d26f6905e85a3569b2e8f01bcfff5fbc Mon Sep 17 00:00:00 2001 From: Vijay Mamidi Date: Wed, 7 Oct 2020 11:38:24 -0700 Subject: [PATCH] Do not cache TE header with random values --- proxy/http/HttpTransact.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 906f1189b65..801803f6eba 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -4971,6 +4971,8 @@ HttpTransact::set_headers_for_cache_write(State *s, HTTPInfo *cache_info, HTTPHd // Set-Cookie should not be put in the cache to prevent // sending person A's cookie to person B cache_info->response_get()->field_delete(MIME_FIELD_SET_COOKIE, MIME_LEN_SET_COOKIE); + // Transfer Encoding header shouldn't be cached as it is hop by hop header + cache_info->response_get()->field_delete(MIME_FIELD_TRANSFER_ENCODING, MIME_LEN_TRANSFER_ENCODING); cache_info->request_get()->field_delete(MIME_FIELD_VIA, MIME_LEN_VIA); // server 200 Ok for Range request cache_info->request_get()->field_delete(MIME_FIELD_RANGE, MIME_LEN_RANGE);