summary refs log tree commit diff
path: root/synapse/rest/media/v0
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-09-12 20:41:31 +1000
committerGitHub <noreply@github.com>2018-09-12 20:41:31 +1000
commit02aa41809bd48cc1dd02da3634f02f5eae71b41c (patch)
tree71cd7d6ae4983d2cff2f2f25fa82b088d746871b /synapse/rest/media/v0
parentPort crypto/ to Python 3 (#3822) (diff)
downloadsynapse-02aa41809bd48cc1dd02da3634f02f5eae71b41c.tar.xz
Port rest/ to Python 3 (#3823)
Diffstat (limited to 'synapse/rest/media/v0')
-rw-r--r--synapse/rest/media/v0/content_repository.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v0/content_repository.py b/synapse/rest/media/v0/content_repository.py

index f255f2883f..5a426ff2f6 100644 --- a/synapse/rest/media/v0/content_repository.py +++ b/synapse/rest/media/v0/content_repository.py
@@ -56,7 +56,7 @@ class ContentRepoResource(resource.Resource): # servers. # TODO: A little crude here, we could do this better. - filename = request.path.split('/')[-1] + filename = request.path.decode('ascii').split('/')[-1] # be paranoid filename = re.sub("[^0-9A-z.-_]", "", filename) @@ -78,7 +78,7 @@ class ContentRepoResource(resource.Resource): # select private. don't bother setting Expires as all our matrix # clients are smart enough to be happy with Cache-Control (right?) request.setHeader( - "Cache-Control", "public,max-age=86400,s-maxage=86400" + b"Cache-Control", b"public,max-age=86400,s-maxage=86400" ) d = FileSender().beginFileTransfer(f, request)