Skip to content

Commit

Permalink
removed arguments from json content type
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorix committed Dec 2, 2011
1 parent 3c825d7 commit a9a6511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cyclone/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ def write(self, chunk):
To write the output to the network, use the flush() method below.
If the given chunk is a dictionary, we write it as JSON and set
the Content-Type of the response to be text/javascript.
the Content-Type of the response to be application/json.
"""
assert not self._finished
if isinstance(chunk, dict):
chunk = escape.json_encode(chunk)
self.set_header("Content-Type", "application/json; charset=UTF-8")
self.set_header("Content-Type", "application/json")
chunk = _utf8(chunk)
self._write_buffer.append(chunk)

Expand Down

0 comments on commit a9a6511

Please sign in to comment.