summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Saddi <allan@saddi.com>2007-01-10 18:19:00 +0000
committerAllan Saddi <allan@saddi.com>2007-01-10 18:19:00 +0000
commitb0783c1358f71f2c77e20e9393b932184781db0e (patch)
treec9592cd914ac5c6f05b388c2ac37f899c59f4066
parent97a38c2514a1690a190d57019497d12ce000786d (diff)
downloadflup-b0783c1358f71f2c77e20e9393b932184781db0e.tar.gz
Support gzip compression of XHTML pages using the
correct MIME type.
-rw-r--r--ChangeLog5
-rw-r--r--flup/middleware/gzip.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c9da87a..01e08b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-10 Allan Saddi <allan@saddi.com>
+
+ * Support gzip compression of XHTML pages using the
+ correct MIME type.
+
2006-12-29 Allan Saddi <allan@saddi.com>
* Deprecate WSGI_SCRIPT_NAME and scriptName in scgi_base.
diff --git a/flup/middleware/gzip.py b/flup/middleware/gzip.py
index abfc1d9..59a800d 100644
--- a/flup/middleware/gzip.py
+++ b/flup/middleware/gzip.py
@@ -220,7 +220,7 @@ class GzipMiddleware(object):
producing the most compression. The default is 9.
"""
if mime_types is None:
- mime_types = ['text/.*']
+ mime_types = ['text/', r'''application/(?:.+\+)?xml$''']
self._application = application
self._mime_types = [re.compile(m) for m in mime_types]