summary refs log tree commit diff
path: root/synapse/rest/media
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-30 00:38:21 +0100
committerGitHub <noreply@github.com>2018-04-30 00:38:21 +0100
commitdbf6f28d640e5a19b5696ef0c512dbd956580e4f (patch)
treee0c6f054408f61288a2ca7d29aec396fb51377ab /synapse/rest/media
parentMerge pull request #3140 from matrix-org/rav/use_run_in_background (diff)
parentmore bytes strings (diff)
downloadsynapse-dbf6f28d640e5a19b5696ef0c512dbd956580e4f.tar.xz
Merge pull request #3155 from NotAFile/py3-bytes-1
more bytes strings
Diffstat (limited to 'synapse/rest/media')
-rw-r--r--synapse/rest/media/v1/upload_resource.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/rest/media/v1/upload_resource.py b/synapse/rest/media/v1/upload_resource.py
index f6f498cdc5..a31e75cb46 100644
--- a/synapse/rest/media/v1/upload_resource.py
+++ b/synapse/rest/media/v1/upload_resource.py
@@ -81,15 +81,15 @@ class UploadResource(Resource):
         headers = request.requestHeaders
 
         if headers.hasHeader("Content-Type"):
-            media_type = headers.getRawHeaders("Content-Type")[0]
+            media_type = headers.getRawHeaders(b"Content-Type")[0]
         else:
             raise SynapseError(
                 msg="Upload request missing 'Content-Type'",
                 code=400,
             )
 
-        # if headers.hasHeader("Content-Disposition"):
-        #     disposition = headers.getRawHeaders("Content-Disposition")[0]
+        # if headers.hasHeader(b"Content-Disposition"):
+        #     disposition = headers.getRawHeaders(b"Content-Disposition")[0]
         # TODO(markjh): parse content-dispostion
 
         content_uri = yield self.media_repo.create_content(