Index: turbogears/tests/test_controllers.py
===================================================================
--- turbogears/tests/test_controllers.py	(revision 25)
+++ turbogears/tests/test_controllers.py	(working copy)
@@ -38,10 +38,14 @@
         self.value = value
         return str(value)
         
-    @turbogears.expose(tg_format="json", html="turbogears.tests.simple")
+    @turbogears.expose(format="json", html="turbogears.tests.simple")
     def returnjson(self):
         return dict(title="Foobar", mybool=False, someval="foo",
             tg_html="turbogears.tests.simple")
+    
+    @turbogears.expose(content_type="xml/atom", html="turbogears.tests.simple")
+    def contenttype(self):
+        return dict(title="Foobar", mybool=False, someval="niggles")
 
     @turbogears.expose(validators={
         "firstname": validators.String(min=2, not_empty=True),
@@ -111,6 +115,11 @@
         firstline = cherrypy.response.body[0]
         assert '"title":"Foobar"' not in firstline
     
+    def test_contentType(self):
+        """The content-type can be set via expose"""
+        util.createRequest("/contenttype")
+        assert cherrypy.response.headerMap["Content-Type"] == "xml/atom"
+
     def test_returnedTemplateName(self):
         util.createRequest("/returnedtemplate")
         data = cherrypy.response.body[0]
@@ -200,4 +209,4 @@
     def tearDown(self):
         cherrypy.config.update({"server.webpath" : ""})
         turbogears.startup.startTurboGears()
-        
\ No newline at end of file
+        
Index: turbogears/controllers.py
===================================================================
--- turbogears/controllers.py	(revision 25)
+++ turbogears/controllers.py	(working copy)
@@ -56,7 +56,7 @@
         output = output.encode("utf8")
     return output
         
-def expose(html=None, validators=None, tg_format=None):
+def expose(html=None, validators=None, format=None, content_type="text/html"):
     """TurboGears verson of CherryPy's expose.
     
     In addition to exposing the method to the web, this expose function will
@@ -75,15 +75,18 @@
     @type html: string
     @param validators: maps argument names to validator applied to that arg
     @type validators: dict or instance of formencode.Schema
-    @param tg_format: format to output by default
-    @type tg_format: string
+    @param format: format to output by default
+    @type format: string
+    @param content_type: sets the content-type http header
+    @type content_type: string
     """
     import controllers
     
     def decorator(func):
         def newfunc(self, *args, **kw):
-            _tg_format = kw.pop("tg_format", tg_format)
+            tg_format = kw.pop("tg_format", format)
             underscore = kw.pop("_", None)
+            cherrypy.response.headerMap['Content-Type']= content_type
             
             errors = {}
             if validators:
@@ -107,7 +110,7 @@
                     raise turbogearsvalid.Invalid(str(errors))
             else:
                 output = func(self, *args, **kw)
-            return controllers._process_output(_tg_format, output, html)
+            return controllers._process_output(tg_format, output, html)
         newfunc.func_name = func.func_name
         newfunc.exposed = True
         return newfunc
