mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
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>
This commit is contained in:
parent
8da39ad98f
commit
6168351877
6 changed files with 14 additions and 14 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue