about summary refs log tree commit diff
path: root/LibMatrix
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix')
-rw-r--r--LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs

index e5095f1..e2f52cd 100644 --- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs +++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
@@ -439,7 +439,8 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { try { // Console.WriteLine($"Trying authenticated media URL: {uri}"); var res = await ClientHttpClient.SendAsync(new() { - Method = HttpMethod.Head, + // Method = HttpMethod.Head, // This apparently doesn't work with Matrix-Media-Repo... + Method = HttpMethod.Get, RequestUri = (new Uri(mxcUri.ToDownloadUri(BaseUrl, filename, timeout), string.IsNullOrWhiteSpace(BaseUrl) ? UriKind.Relative : UriKind.Absolute)) }); if (res.IsSuccessStatusCode) { @@ -455,7 +456,8 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver { try { // Console.WriteLine($"Trying legacy media URL: {uri}"); var res = await ClientHttpClient.SendAsync(new() { - Method = HttpMethod.Head, + // Method = HttpMethod.Head, + Method = HttpMethod.Get, RequestUri = new(mxcUri.ToLegacyDownloadUri(BaseUrl, filename, timeout), string.IsNullOrWhiteSpace(BaseUrl) ? UriKind.Relative : UriKind.Absolute) }); if (res.IsSuccessStatusCode) {