Skip to content
Browse files

Fixed content_type method

  • Loading branch information...
1 parent e5c32fd commit 69754d9d948005ef19275659dcd112416bafe83e @sadig committed Jul 30, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 dc2/lib/web/controllers/controller.py
View
7 dc2/lib/web/controllers/controller.py
@@ -96,6 +96,13 @@ def _content_type(self,formats=None):
if output_format is not None:
if output_format.lower() == 'json':
return 'application/json; charset=utf-8'
+ if output_format.lower() == 'html':
+ return 'text/html; charset=utf-8'
+ else:
+ if content_type is None:
+ return 'text/html; charset=utf-8'
+ else:
+ return content_type
def process(self, path='/'):
verb=self._process_request(path)

0 comments on commit 69754d9

Please sign in to comment.
Something went wrong with that request. Please try again.