aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Relay/RelayClient.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-01-07 18:54:29 -0600
committerGitHub <noreply@github.com>2023-01-07 18:54:29 -0600
commitff5f0ac6c93f2b49ba259e7093fb92fa873116c6 (patch)
tree89a57703213c524f09346aac4fcf3a9ee8b3cf04 /src/slskd/Relay/RelayClient.cs
parentd5eabb72a5c5a3aed06f0c4b8f66c853468b889b (diff)
parentf07a7758b47388c793d73ca54727db95abfcd229 (diff)
downloadslskd-ff5f0ac6c93f2b49ba259e7093fb92fa873116c6.tar.gz
Merge pull request #827 from slskd/relay-debug
Miscellaneous Relay refactoring and bugfixes
Diffstat (limited to 'src/slskd/Relay/RelayClient.cs')
-rw-r--r--src/slskd/Relay/RelayClient.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slskd/Relay/RelayClient.cs b/src/slskd/Relay/RelayClient.cs
index d6bde1d7..c2d396a8 100644
--- a/src/slskd/Relay/RelayClient.cs
+++ b/src/slskd/Relay/RelayClient.cs
@@ -321,8 +321,6 @@ namespace slskd.Relay
using var content = new MultipartFormDataContent
{
- { new StringContent(OptionsMonitor.CurrentValue.InstanceName), "name" },
- { new StringContent(ComputeCredential(token)), "credential" },
{ new StreamContent(stream), "file", filename },
};
@@ -418,6 +416,10 @@ namespace slskd.Relay
destinationFile = Path.Combine(OptionsMonitor.CurrentValue.Directories.Downloads, $"{filename}.relayed");
}
+ // if the controller is Windows and the agent is Linux or vice versa, we need to translate
+ // the filename to the local OS or we're going to get funny results when we go to write the file
+ destinationFile = destinationFile.LocalizePath();
+
await Retry.Do(task: async () =>
{
using var request = new HttpRequestMessage(HttpMethod.Get, $"api/v0/relay/downloads/{token}");