diff --git a/NexVerse/Server/Api/OglGaragePublicStorageApi.cs b/NexVerse/Server/Api/OglGaragePublicStorageApi.cs index 3a763913..95fa84cc 100644 --- a/NexVerse/Server/Api/OglGaragePublicStorageApi.cs +++ b/NexVerse/Server/Api/OglGaragePublicStorageApi.cs @@ -2,7 +2,6 @@ // Optional, fail-closed public Garage monitoring. No S3 credentials are used here. using System; using System.IO; -using System.Text; using System.Text.Json; using Nini.Config; using OpenSim.Framework.Servers.HttpServer; @@ -36,7 +35,7 @@ namespace NexVerse.Server.Api response.ContentType = "application/json; charset=utf-8"; response.AddHeader("X-Content-Type-Options", "nosniff"); response.AddHeader("Cache-Control", "no-store"); - if (!string.Equals(request.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase)) + if (request == null || !string.Equals(request.HttpMethod, "GET", StringComparison.OrdinalIgnoreCase)) { response.StatusCode = 405; response.AddHeader("Allow", "GET"); @@ -78,9 +77,11 @@ namespace NexVerse.Server.Api storage = new { capacity_bytes = capacity, used_bytes = used, - free_bytes = capacity - used, + remaining_reference_bytes = capacity - used, usage_percent = Math.Round(100.0 * used / capacity, 2) }, + usage_basis = "logical_object_bytes", + capacity_basis = "configured_reference_not_physical_quota", objects = new { total = objects }, updated_at = updated });