summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/resources/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/service/pixelated/resources/__init__.py b/service/pixelated/resources/__init__.py
index 9ccca7ee..cd27fab0 100644
--- a/service/pixelated/resources/__init__.py
+++ b/service/pixelated/resources/__init__.py
@@ -36,14 +36,14 @@ class SetEncoder(json.JSONEncoder):
def respond_json(entity, request, status_code=200):
json_response = json.dumps(entity, cls=SetEncoder)
- request.responseHeaders.addRawHeader(b"content-type", [b"application/json"])
+ request.responseHeaders.setRawHeaders(b"content-type", [b"application/json"])
request.code = status_code
return json_response
def respond_json_deferred(entity, request, status_code=200):
json_response = json.dumps(entity, cls=SetEncoder)
- request.responseHeaders.addRawHeader(b"content-type", [b"application/json"])
+ request.responseHeaders.setRawHeaders(b"content-type", [b"application/json"])
request.code = status_code
request.write(json_response)
request.finish()