mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-22 17:46:08 +03:00
Stop parsing the unspecced type parameter on thumbnail requests. (#15137)
Ideally we would replace this with parsing of the Accept header or something else, but for now just make Synapse spec compliant by ignoring the unspecced parameter. It does not seem that this is ever sent by a client, and even if it is there's a reasonable fallback.
This commit is contained in:
parent
ec79870f14
commit
f8a584ed02
2 changed files with 3 additions and 1 deletions
1
changelog.d/15137.removal
Normal file
1
changelog.d/15137.removal
Normal file
|
@ -0,0 +1 @@
|
|||
Remove the undocumented and unspecced `type` parameter to the `/thumbnail` endpoint.
|
|
@ -69,7 +69,8 @@ class ThumbnailResource(DirectServeJsonResource):
|
|||
width = parse_integer(request, "width", required=True)
|
||||
height = parse_integer(request, "height", required=True)
|
||||
method = parse_string(request, "method", "scale")
|
||||
m_type = parse_string(request, "type", "image/png")
|
||||
# TODO Parse the Accept header to get an prioritised list of thumbnail types.
|
||||
m_type = "image/png"
|
||||
|
||||
if server_name == self.server_name:
|
||||
if self.dynamic_thumbnails:
|
||||
|
|
Loading…
Reference in a new issue