diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-06 13:21:39 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-06 13:21:39 +0000 |
commit | adb04b1e572d13b75541f4684aac3683e94d70b8 (patch) | |
tree | b36f569406a99ceb737fdcb180513e3137cc3be2 /synapse/http/server.py | |
parent | Set a content-length for JSON responses (diff) | |
download | synapse-adb04b1e572d13b75541f4684aac3683e94d70b8.tar.xz |
Update copyright notices
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index de26afb48a..8015a22edf 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2014 OpenMarket Ltd +# Copyright 2014, 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -233,7 +233,7 @@ def respond_with_json_bytes(request, code, json_bytes, send_cors=False, request.setResponseCode(code, message=response_code_message) request.setHeader(b"Content-Type", b"application/json") request.setHeader(b"Server", AGENT_NAME) - request.setHeader(b"Content-Length", b"%d" % len(json_bytes)) + request.setHeader(b"Content-Length", b"%d" % (len(json_bytes),)) if send_cors: request.setHeader("Access-Control-Allow-Origin", "*") |