From e136989b899609594622cafb50e8631746ecb2a6 Mon Sep 17 00:00:00 2001 From: Adrian-Grimm Date: Sat, 30 Dec 2023 13:34:29 +0100 Subject: [PATCH] BugFix #266 - ESCL download from relative URI response target. --- NAPS2.Escl/Client/EsclClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NAPS2.Escl/Client/EsclClient.cs b/NAPS2.Escl/Client/EsclClient.cs index 6402ee5cd7..16a3945607 100644 --- a/NAPS2.Escl/Client/EsclClient.cs +++ b/NAPS2.Escl/Client/EsclClient.cs @@ -101,9 +101,11 @@ public async Task CreateScanJob(EsclScanSettings settings) response.EnsureSuccessStatusCode(); Logger.LogDebug("POST OK"); + var uri = response.Headers.Location!; + return new EsclJob { - UriPath = response.Headers.Location!.AbsolutePath + UriPath = uri.IsAbsoluteUri ? uri.AbsolutePath : uri.OriginalString }; }