Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

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  
    195195                        package=self.package.__name__, 
    196196                        paths=self.paths) 
    197197        config.update(self) 
    198         # set up the response options to None.  This allows 
    199         # you to set the proper content type within a controller method 
    200         # if you choose. 
    201         pylons_config['pylons.response_options']['headers']['Content-Type'] = None 
    202198 
    203199        #see http://trac.turbogears.org/ticket/2247 
    204200        if asbool(config['debug']): 
  • tg/controllers/decoratedcontroller.py

    diff -r f429027babe0 tg/controllers/decoratedcontroller.py
    a b  
    7272 
    7373        """ 
    7474 
     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 
    7580        self._initialize_validation_context() 
    7681 
    7782        pylons.request.start_response = getattr(self, 'start_response', None)