Skip to content

Commit

Permalink
BugFix #266 - ESCL download from relative URI response target.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Grimm committed Dec 30, 2023
1 parent 924b1af commit e136989
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NAPS2.Escl/Client/EsclClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ public async Task<EsclJob> 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
};
}

Expand Down

0 comments on commit e136989

Please sign in to comment.