summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-10-05 20:49:39 -0500
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-10-05 20:49:39 -0500
commitb28c7da0a4507825440fd801e1b6dbc5e6a454a7 (patch)
tree5b302f5743df9a156dde813554e4c166d5c474c2 /synapse
parentAllow synapse's useragent to be customized (diff)
downloadsynapse-b28c7da0a4507825440fd801e1b6dbc5e6a454a7.tar.xz
Preserve version string in user agent
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/server.py2
-rw-r--r--synapse/http/client.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 50c4afdcfe..5c2d6bfeab 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -26,7 +26,7 @@ class ServerConfig(Config):
         self.soft_file_limit = config["soft_file_limit"]
         self.daemonize = config.get("daemonize")
         self.print_pidfile = config.get("print_pidfile")
-        self.user_agent_override = config.get("user_agent_override")
+        self.user_agent_suffix = config.get("user_agent_suffix")
         self.use_frozen_dicts = config.get("use_frozen_dicts", True)
 
         self.listeners = config.get("listeners", [])
diff --git a/synapse/http/client.py b/synapse/http/client.py
index 6adf35c7bf..5017801773 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -67,9 +67,9 @@ class SimpleHttpClient(object):
             connectTimeout=15,
             contextFactory=hs.get_http_client_context_factory()
         )
-        self.user_agent = hs.config.user_agent_override
-        if self.user_agent is None:
-            self.user_agent = hs.version_string
+        self.user_agent = hs.version_string
+        if hs.config.user_agent_suffix:
+            self.user_agent += " - " + hs.config.user_agent_suffix
 
     def request(self, method, uri, *args, **kwargs):
         # A small wrapper around self.agent.request() so we can easily attach