From 12ee1bf72bd9e5c273ef4cdfa510f4e04b14db8e Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Mon, 27 Oct 2025 12:31:07 +0100 Subject: [PATCH] Merge pull request #6560 from duplicati/feature/more-robust-request-forward Guard against sending extra header. --- Duplicati/Library/RemoteControl/KeepRemoteConnection.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/RemoteControl/KeepRemoteConnection.cs b/Duplicati/Library/RemoteControl/KeepRemoteConnection.cs index 725f7b67a..2d185acb0 100644 --- a/Duplicati/Library/RemoteControl/KeepRemoteConnection.cs +++ b/Duplicati/Library/RemoteControl/KeepRemoteConnection.cs @@ -645,8 +645,11 @@ public class KeepRemoteConnection : IDisposable { foreach (var header in CommandRequestMessage.Headers) { - if (header.Key == "Content-Type" && request.Content != null) - request.Content.Headers.ContentType = new MediaTypeHeaderValue(header.Value); + if (header.Key == "Content-Type") + { + if (request.Content != null) + request.Content.Headers.ContentType = new MediaTypeHeaderValue(header.Value); + } else request.Headers.Add(header.Key, header.Value); }