changeset 4230:2074c2204d03

Proxied mimetype/content_type response header to underlying request object
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sat, 19 Jul 2008 01:53:28 +0200
parents c60dee8f45be
children a29fd3a9e91f
files MoinMoin/web/contexts.py
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/contexts.py	Sat Jul 19 01:35:07 2008 +0200
+++ b/MoinMoin/web/contexts.py	Sat Jul 19 01:53:28 2008 +0200
@@ -171,6 +171,24 @@
     _cache_disabled = EnvironProxy('old._cache_disabled', 0)
     cacheable = EnvironProxy('old.cacheable', 0)
 
+    def _getter(self):
+        return self.request.mimetype
+    def _setter(self, value):
+        self.request.mimetype = value
+    def _deleter(self):
+        del self.request.mimetype
+    mimetype = property(_getter, _setter, _deleter)
+
+    def _getter(self):
+        return self.request.content_type
+    def _setter(self, value):
+        self.request.content_type = value
+    def _deleter(self):
+        del self.request.content_type
+    content_type = property(_getter, _setter, _deleter)
+
+    del _getter, _setter, _deleter
+
     def write(self, *data):
         if len(data) > 1:
             logging.warning("Some code still uses write with multiple arguments, "