diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-06 10:53:04 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-06 10:53:04 +0000 |
commit | 96a5ba41f503982dfa8b7d669161ea43b0529189 (patch) | |
tree | 4ad40ec4cac09fd67b01cd10ce6f99e295953b72 /synapse/http/server.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse into erikj-perf (diff) | |
parent | spell out that VoIP needs TURN (diff) | |
download | synapse-96a5ba41f503982dfa8b7d669161ea43b0529189.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj-perf
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index f33859cf76..5765dffe39 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -14,14 +14,16 @@ # limitations under the License. -from syutil.jsonutil import ( - encode_canonical_json, encode_pretty_printed_json -) +from synapse.http.agent_name import AGENT_NAME from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException ) from synapse.util.logcontext import LoggingContext +from syutil.jsonutil import ( + encode_canonical_json, encode_pretty_printed_json +) + from twisted.internet import defer, reactor from twisted.web import server, resource from twisted.web.server import NOT_DONE_YET @@ -230,6 +232,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) if send_cors: request.setHeader("Access-Control-Allow-Origin", "*") |