Skip to content
This repository
Browse code

Setting correct Content-Type header for JSON response from ListingView.

  • Loading branch information...
commit 0afcd7f0b4da8d10572b099c88f188768bfe84b1 1 parent 15faaac
Lukas Graf authored April 24, 2012
3  docs/HISTORY.txt
@@ -5,7 +5,8 @@ Changelog
5 5
 3.2.3 (unreleased)
6 6
 ------------------
7 7
 
8  
-- Nothing changed yet.
  8
+- Setting correct Content-Type header for JSON response from ListingView.
  9
+  [lgraf]
9 10
 
10 11
 
11 12
 3.2.2 (2012-04-23)
2  ftw/tabbedview/browser/listing.py
@@ -103,6 +103,8 @@ def __call__(self, *args, **kwargs):
103 103
                     static['selection'] = self.selection()
104 104
 
105 105
                 self.table_options.update({'static': static})
  106
+                # Set correct content type for JSON response
  107
+                self.request.response.setHeader("Content-type", "application/json")
106 108
                 return self.render_listing()
107 109
             else:
108 110
                 self.contents = [{}, ]

0 notes on commit 0afcd7f

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