title: webapp2 How to remove Cache-Control: no-cache from response header?
body: <p>I'm having trouble serving an appengine blobstore over HTTPS, specifically with IE 8 &amp; IE 7 browsers, as the browser just does not like to serve downloadable contents over https.
  According to a microsoft article, it's because of the <strong>Cache-Control: no-cache</strong> header.</p>
  
  <p><a href="http://blogs.msdn.com/b/ieinternals/archive/2009/10/02/internet-explorer-cannot-download-over-https-when-no-cache.aspx" rel="nofollow">http://blogs.msdn.com/b/ieinternals/archive/2009/10/02/internet-explorer-cannot-download-over-https-when-no-cache.aspx</a></p>
  
  <p>The solution proposed in the article is to remove the Cache-Control: no-cache header from the response.
  However, it seems that webapp2 automatically adds this header even after I tried setting it to something else.</p>
  
  <p>According to the source code, it seems to be added to every response 
  <a href="http://code.google.com/p/webapp-improved/source/browse/webapp2.py#362" rel="nofollow">http://code.google.com/p/webapp-improved/source/browse/webapp2.py#362</a></p>
  
  <pre><code>def __init__(self, *args, **kwargs):
          """Constructs a response with the default settings."""
          super(Response, self).__init__(*args, **kwargs)
          self.headers['Cache-Control'] = 'no-cache'
  </code></pre>
  
  <p>Is there a way to override this behavior?</p>
  
  <p>This is what I tried to do when building my response, but still the 'Cache-Control: no-cache' would still be there once the response is rendered.</p>
  
  <pre><code>self.response.headers['Pragma'] = 'cache-control'
  self.response.headers['Cache-Control'] = 'private'
  self.response.cache_control.no_cache = None
  self.response.cache_control.public = False
  self.response.cache_control.max_age = 1
  </code></pre>