Skip to content

Commit

Permalink
* Fixed jsonify to use application/json as its the proper mime-type a…
Browse files Browse the repository at this point in the history
…nd now

  used all over the net.

--HG--
branch : trunk
  • Loading branch information
bbangert committed Feb 29, 2008
1 parent da43679 commit dd202da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,8 @@ Pylons Changelog
=================

0.9.7 (**tip**)
* Fixed jsonify to use application/json as its the proper mime-type and now
used all over the net.
* Fixed minimal template not replacing variables properly. Fixes #377.
* Fixed @validate decorator to no longer catch exceptions should they be
raised in the action that is supposed to display a form. Fixes #374.
Expand Down
2 changes: 1 addition & 1 deletion pylons/decorators/__init__.py
Expand Up @@ -24,7 +24,7 @@ def jsonify(func, *args, **kwargs):
turn the result into JSON, with a content-type of 'text/javascript'
and output it.
"""
pylons.response.headers['Content-Type'] = 'text/javascript'
pylons.response.headers['Content-Type'] = 'application/json'
data = func(*args, **kwargs)
if isinstance(data, list):
msg = "JSON responses with Array envelopes are susceptible to " \
Expand Down

0 comments on commit dd202da

Please sign in to comment.