Commit 6bd0fb34 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Fix: Increased connection limit (coscine/issues#853)

parent 76d4d6bc
......@@ -149,7 +149,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Coscine.Database" publicKeyToken="767d77427707b70a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.21.0.0" newVersion="1.21.0.0" />
<bindingRedirect oldVersion="0.0.0.0-1.22.2.0" newVersion="1.22.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
......
......@@ -59,7 +59,8 @@ namespace Coscine.Api.Tree.Controllers
public Uri GenerateId(string resourceId, string path)
{
return new Uri($"https://purl.org/coscine/md/{resourceId}/{path}/".ToLower());
var escapedPath = Uri.EscapeDataString(Uri.UnescapeDataString(path));
return new Uri($"https://purl.org/coscine/md/{resourceId}/{escapedPath}/".ToLower());
}
[HttpGet("[controller]/{resourceId}/{path}")]
......@@ -86,7 +87,7 @@ namespace Coscine.Api.Tree.Controllers
}
var provider = GetResourceTypeName(resource);
var infos = await _waterbutlerInterface.GetObjectInfoAsync(HttpUtility.UrlDecode(path), provider, authHeader);
var infos = await _waterbutlerInterface.GetObjectInfoAsync(Uri.UnescapeDataString(path), provider, authHeader);
// Not found
if (infos == null)
......@@ -98,7 +99,7 @@ namespace Coscine.Api.Tree.Controllers
foreach (var info in infos)
{
var id = GenerateId(resourceId, HttpUtility.UrlEncode(info.Path));
var id = GenerateId(resourceId, info.Path);
if (_util.HasGraph(id))
{
var graph = _util.GetGraph(id);
......@@ -121,7 +122,7 @@ namespace Coscine.Api.Tree.Controllers
public IActionResult StoreMetadataForFile(string resourceId, string path)
{
var innerBlock = ObjectFactory<JToken>.DeserializeFromStream(Request.Body);
var graphNameUri = (GenerateId(resourceId, path));
var graphNameUri = GenerateId(resourceId, path);
var json = new JObject
{
......@@ -205,7 +206,6 @@ namespace Coscine.Api.Tree.Controllers
{
return BadRequest("Data has the wrong format!");
}
// store the data
if (_util.HasGraph(graphNameUri))
{
......
......@@ -7,6 +7,7 @@ namespace Coscine.Api.Tree
{
public static void Main()
{
System.Net.ServicePointManager.DefaultConnectionLimit = int.MaxValue;
InitializeWebService<Startup>();
}
}
......
......@@ -45,8 +45,8 @@
<Reference Include="Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL">
<HintPath>..\packages\Consul.0.7.2.6\lib\net45\Consul.dll</HintPath>
</Reference>
<Reference Include="Coscine.Api.WaterbutlerHelper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Api.WaterbutlerHelper.1.0.0-topic-802-refact0010\lib\net461\Coscine.Api.WaterbutlerHelper.dll</HintPath>
<Reference Include="Coscine.Api.WaterbutlerHelper, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Api.WaterbutlerHelper.1.1.0-topic-853-refact0003\lib\net461\Coscine.Api.WaterbutlerHelper.dll</HintPath>
</Reference>
<Reference Include="Coscine.ApiCommons, Version=1.8.0.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.8.0\lib\net461\Coscine.ApiCommons.dll</HintPath>
......@@ -54,14 +54,14 @@
<Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath>
</Reference>
<Reference Include="Coscine.Database, Version=1.21.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.21.0\lib\net461\Coscine.Database.dll</HintPath>
<Reference Include="Coscine.Database, Version=1.22.2.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.22.2-product-801-refa0003\lib\net461\Coscine.Database.dll</HintPath>
</Reference>
<Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath>
</Reference>
<Reference Include="Coscine.Metadata, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Metadata.1.1.2\lib\net461\Coscine.Metadata.dll</HintPath>
<Reference Include="Coscine.Metadata, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Metadata.1.3.0-topic-853-refact0001\lib\net461\Coscine.Metadata.dll</HintPath>
</Reference>
<Reference Include="dotNetRDF, Version=2.5.1.0, Culture=neutral, PublicKeyToken=6055ffe4c97cc780, processorArchitecture=MSIL">
<HintPath>..\packages\dotNetRDF.2.5.1\lib\net40\dotNetRDF.dll</HintPath>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Consul" version="0.7.2.6" targetFramework="net461" />
<package id="Coscine.Api.WaterbutlerHelper" version="1.0.0-topic-802-refact0010" targetFramework="net461" />
<package id="Coscine.Api.WaterbutlerHelper" version="1.1.0-topic-853-refact0003" targetFramework="net461" />
<package id="Coscine.ApiCommons" version="1.8.0" targetFramework="net461" />
<package id="Coscine.Configuration" version="1.5.0" targetFramework="net461" />
<package id="Coscine.Database" version="1.21.0" targetFramework="net461" />
<package id="Coscine.Database" version="1.22.2-product-801-refa0003" targetFramework="net461" />
<package id="Coscine.Logging" version="1.2.0" targetFramework="net461" />
<package id="Coscine.Metadata" version="1.1.2" targetFramework="net461" />
<package id="Coscine.Metadata" version="1.3.0-topic-853-refact0001" targetFramework="net461" />
<package id="dotNetRDF" version="2.5.1" targetFramework="net461" />
<package id="dotNetRDF.Data.Virtuoso" version="2.5.1" targetFramework="net461" />
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment