Ticket #2466: tg21.duplicate_content_type.patch
| File tg21.duplicate_content_type.patch, 1.2 KB (added by Tomoyuki Kano, 2 years ago) |
|---|
-
tg/configuration.py
diff -r f429027babe0 tg/configuration.py
a b 195 195 package=self.package.__name__, 196 196 paths=self.paths) 197 197 config.update(self) 198 # set up the response options to None. This allows199 # you to set the proper content type within a controller method200 # if you choose.201 pylons_config['pylons.response_options']['headers']['Content-Type'] = None202 198 203 199 #see http://trac.turbogears.org/ticket/2247 204 200 if asbool(config['debug']): -
tg/controllers/decoratedcontroller.py
diff -r f429027babe0 tg/controllers/decoratedcontroller.py
a b 72 72 73 73 """ 74 74 75 # set up the response options to None. This allows 76 # you to set the proper content type within a controller method 77 # if you choose. 78 pylons.response.headers['Content-Type'] = None 79 75 80 self._initialize_validation_context() 76 81 77 82 pylons.request.start_response = getattr(self, 'start_response', None)