Skip to content

Commit

Permalink
Merge pull request #267 from Adrian-Grimm/master
Browse files Browse the repository at this point in the history
BugFix #266 ESCL relative response URLs
  • Loading branch information
cyanfish authored Dec 30, 2023
2 parents ae89fa6 + 820d0f7 commit b6f868b
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 b6f868b

Please sign in to comment.