From c1b8fa1af5438c5f563fc70bd52ee8aa485e617f Mon Sep 17 00:00:00 2001
From: Boris Kocherov <bk@raskon.ru>
Date: Fri, 22 Dec 2017 02:18:36 +0300
Subject: [PATCH] use Cache-Control respose header setted by "Caching Policy
 Manager"

---
 .../portal_components/document.erp5.Sound.py                     | 1 -
 product/ERP5/Document/BigFile.py                                 | 1 -
 product/ERP5/mixin/downloadable.py                               | 1 -
 3 files changed, 3 deletions(-)

diff --git a/bt5/erp5_multimedia/DocumentTemplateItem/portal_components/document.erp5.Sound.py b/bt5/erp5_multimedia/DocumentTemplateItem/portal_components/document.erp5.Sound.py
index 3004afb89e..648587d018 100644
--- a/bt5/erp5_multimedia/DocumentTemplateItem/portal_components/document.erp5.Sound.py
+++ b/bt5/erp5_multimedia/DocumentTemplateItem/portal_components/document.erp5.Sound.py
@@ -69,7 +69,6 @@ class Sound(File):
     RESPONSE.setHeader('Content-Length', len(data))
     RESPONSE.setHeader('Content-Type', mime)
     filename = self.getStandardFilename(format=format)
-    RESPONSE.setHeader('Cache-Control', 'Private') # workaround for Internet Explorer's bug
     # workaround for IE's bug to download files over SSL
     RESPONSE.setHeader('Pragma', '')
     RESPONSE.setHeader('Content-Disposition',
diff --git a/product/ERP5/Document/BigFile.py b/product/ERP5/Document/BigFile.py
index 59d3eff148..977b3e1f10 100644
--- a/product/ERP5/Document/BigFile.py
+++ b/product/ERP5/Document/BigFile.py
@@ -319,7 +319,6 @@ class BigFile(File):
     if not inline:
       # need to return it as attachment
       filename = self.getStandardFilename(format=format)
-      RESPONSE.setHeader('Cache-Control', 'Private') # workaround for Internet Explorer's bug
       RESPONSE.setHeader('Accept-Ranges', 'bytes')
 
 
diff --git a/product/ERP5/mixin/downloadable.py b/product/ERP5/mixin/downloadable.py
index 0a8b0e184e..560d34f62b 100644
--- a/product/ERP5/mixin/downloadable.py
+++ b/product/ERP5/mixin/downloadable.py
@@ -122,7 +122,6 @@ class DownloadableMixin:
         filename = self.getStandardFilename(format=output_format)
       else:
         filename = self.getStandardFilename(format=format)
-      RESPONSE.setHeader('Cache-Control', 'Private') # workaround for Internet Explorer's bug
       # workaround for IE's bug to download files over SSL
       RESPONSE.setHeader('Pragma', '')
       RESPONSE.setHeader('Content-Disposition',
-- 
2.30.9