diff --git a/src/Stars.Console/Terradue.Stars.Console.csproj b/src/Stars.Console/Terradue.Stars.Console.csproj index 396a5f4b..9f361bd1 100644 --- a/src/Stars.Console/Terradue.Stars.Console.csproj +++ b/src/Stars.Console/Terradue.Stars.Console.csproj @@ -2,7 +2,7 @@ Exe net6.0 - 2.25.0 + 2.25.1 Stars is a CLI for working with Spatio Temporal Catalog such as STAC but not only $(Version)-$(VersionSuffix) diff --git a/src/Stars.Data/Terradue.Stars.Data.csproj b/src/Stars.Data/Terradue.Stars.Data.csproj index 9e93f070..36baf9a5 100644 --- a/src/Stars.Data/Terradue.Stars.Data.csproj +++ b/src/Stars.Data/Terradue.Stars.Data.csproj @@ -4,7 +4,7 @@ Terradue.Stars.Data Terradue.Stars.Data Collection of data Plugins for Terradue.Stars - 2.25.0 + 2.25.1 $(Version)-$(VersionSuffix) NU1603 @@ -51,12 +51,12 @@ all + - + + --> diff --git a/src/Stars.Services/Resources/DefaultResourceServiceProvider.cs b/src/Stars.Services/Resources/DefaultResourceServiceProvider.cs index 281cc849..66936e5b 100644 --- a/src/Stars.Services/Resources/DefaultResourceServiceProvider.cs +++ b/src/Stars.Services/Resources/DefaultResourceServiceProvider.cs @@ -88,9 +88,22 @@ public async Task CreateStreamResourceAsync(IResource resource, try { // First try head request - using (var headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, resource.Uri), ct)) + using (var hr = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, resource.Uri), ct)) { + HttpResponseMessage headResponse = hr; contentHeaders = new HttpCachedHeaders(headResponse); + // Handle response error, but retry with a one-byte range in case of "Method not allowed" status code + /*if (headResponse.StatusCode == System.Net.HttpStatusCode.MethodNotAllowed) + { + //"Range: bytes=0-0 + HttpRequestMessage message = new HttpRequestMessage(HttpMethod.Get, resource.Uri); + message.Headers.Range = new System.Net.Http.Headers.RangeHeaderValue(0, 0); + using (var hr2 = await client.SendAsync(message, ct)) + { + contentHeaders = new HttpCachedHeaders(headResponse); + headResponse = hr2; + } + }*/ headResponse.EnsureSuccessStatusCode(); } } diff --git a/src/Stars.Services/Supplier/Carrier/CarrierManager.cs b/src/Stars.Services/Supplier/Carrier/CarrierManager.cs index 619a3afe..a6c47943 100644 --- a/src/Stars.Services/Supplier/Carrier/CarrierManager.cs +++ b/src/Stars.Services/Supplier/Carrier/CarrierManager.cs @@ -91,7 +91,7 @@ public async Task GetAssetsDeliveryQuotationsAsync(IAssetsCo } catch (Exception e) { - logger.LogWarning("Cannot quote delivery for asset {0} with url {2} : {1}", asset.Key, e.Message, possibleAsset.Uri); + logger.LogWarning("Cannot quote delivery for asset {0} with url {1} : {2}", asset.Key, possibleAsset.Uri, e.Message); logger.LogDebug(e.StackTrace); assetsExceptions.Add(asset.Key, e); } diff --git a/src/Stars.Services/Terradue.Stars.Services.csproj b/src/Stars.Services/Terradue.Stars.Services.csproj index b806d6fd..c28cc92c 100644 --- a/src/Stars.Services/Terradue.Stars.Services.csproj +++ b/src/Stars.Services/Terradue.Stars.Services.csproj @@ -3,7 +3,7 @@ netstandard2.0 Terradue.Stars Stars is a set of services for working with Spatio Temporal Catalog such as STAC but not only - 2.25.0 + 2.25.1 $(Version)-$(VersionSuffix) Terradue.Stars.Services