diff options
author | Adrian Tschira <nota@notafile.com> | 2018-04-03 20:41:21 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-04-04 13:48:51 +0200 |
commit | 616835187702a0c6f16042e3efb452e1ee3e7826 (patch) | |
tree | 88e4de3798a90b18fb2dbe572ba362aa8eaab3c4 /synapse/http/server.py | |
parent | Merge pull request #3049 from matrix-org/rav/use_staticjson (diff) | |
download | synapse-616835187702a0c6f16042e3efb452e1ee3e7826.tar.xz |
Add b prefixes to some strings that are bytes in py3
This has no effect on python2 Signed-off-by: Adrian Tschira <nota@notafile.com>
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 f19c068ef6..d979e76639 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -324,7 +324,7 @@ class JsonResource(HttpServer, resource.Resource): register_paths, so will return (possibly via Deferred) either None, or a tuple of (http code, response body). """ - if request.method == "OPTIONS": + if request.method == b"OPTIONS": return _options_handler, {} # Loop through all the registered callbacks to check if the method @@ -536,7 +536,7 @@ def finish_request(request): def _request_user_agent_is_curl(request): user_agents = request.requestHeaders.getRawHeaders( - "User-Agent", default=[] + b"User-Agent", default=[] ) for user_agent in user_agents: if "curl" in user_agent: |