mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
client/media: work around matrix-media-repo bug
It rejects Authenticated Media requests if X-Matrix values aren't unnecessarily quoted: https://github.com/t2bot/matrix-media-repo/issues/609
This commit is contained in:
parent
3fe0110649
commit
b4fecbc517
1 changed files with 6 additions and 2 deletions
|
|
@ -331,7 +331,9 @@ pub(crate) async fn get_remote_content(
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
Err(Error::Federation(_, error))
|
Err(Error::Federation(_, error))
|
||||||
if error.error_kind() == Some(&ErrorKind::Unrecognized) =>
|
if error.error_kind() == Some(&ErrorKind::Unrecognized)
|
||||||
|
// https://github.com/t2bot/matrix-media-repo/issues/609
|
||||||
|
|| error.error_kind() == Some(&ErrorKind::Unauthorized) =>
|
||||||
{
|
{
|
||||||
info!(
|
info!(
|
||||||
"Remote server does not support authenticated media, falling \
|
"Remote server does not support authenticated media, falling \
|
||||||
|
|
@ -795,7 +797,9 @@ pub(crate) async fn get_remote_thumbnail(
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
Err(Error::Federation(_, error))
|
Err(Error::Federation(_, error))
|
||||||
if error.error_kind() == Some(&ErrorKind::Unrecognized) =>
|
if error.error_kind() == Some(&ErrorKind::Unrecognized)
|
||||||
|
// https://github.com/t2bot/matrix-media-repo/issues/609
|
||||||
|
|| error.error_kind() == Some(&ErrorKind::Unauthorized) =>
|
||||||
{
|
{
|
||||||
info!(
|
info!(
|
||||||
"Remote server does not support authenticated media, falling \
|
"Remote server does not support authenticated media, falling \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue