File: 66_donot_let_cache_html_pages.patch

package info (click to toggle)
mailman 1%3A2.1.23-1%2Bdeb9u5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 38,032 kB
  • sloc: python: 26,688; perl: 2,474; makefile: 1,084; sh: 889; ansic: 319
file content (19 lines) | stat: -rw-r--r-- 860 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Author: Tollef Fog Heen <tfheen@debian.org>
Description: Patch to prevent browser from caching pages (Closes: #281284)
Bug-Debian: #281284
Forwarded: no

Index: b/Mailman/htmlformat.py
===================================================================
--- a/Mailman/htmlformat.py	2012-05-20 14:21:40.878893858 +0200
+++ b/Mailman/htmlformat.py	2012-05-20 14:21:42.038899614 +0200
@@ -302,7 +302,8 @@
         charset = 'us-ascii'
         if self.language and Utils.IsLanguage(self.language):
             charset = Utils.GetCharSet(self.language)
-        output = ['Content-Type: text/html; charset=%s\n' % charset]
+        output = ['Content-Type: text/html; charset=%s' % charset]
+        output.append('Cache-control: no-cache\n')
         if not self.suppress_head:
             kws.setdefault('bgcolor', self.bgcolor)
             tab = ' ' * indent