Skip to content
Snippets Groups Projects
Commit e4d90276 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Fix: Changed UrlEncoding

parent 93d4a4ba
No related branches found
No related tags found
2 merge requests!4Product/801 refactor file metadata,!3Sprint/2020 12
......@@ -59,8 +59,7 @@ namespace Coscine.Api.Tree.Controllers
public Uri GenerateId(string resourceId, string path)
{
var escapedPath = Uri.EscapeDataString(Uri.UnescapeDataString(path));
return new Uri($"https://purl.org/coscine/md/{resourceId}/{escapedPath}/".ToLower());
return new Uri($"https://purl.org/coscine/md/{resourceId}/{path}/".ToLower());
}
[HttpGet("[controller]/{resourceId}/{path}")]
......@@ -99,7 +98,7 @@ namespace Coscine.Api.Tree.Controllers
foreach (var info in infos)
{
var id = GenerateId(resourceId, info.Path);
var id = GenerateId(resourceId, Uri.EscapeDataString(info.Path));
if (_util.HasGraph(id))
{
var graph = _util.GetGraph(id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment