From ffa6c647f84b53c21b114fba2b4e1ccb32ff2495 Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Wed, 3 Dec 2025 08:54:28 +0100 Subject: [PATCH] final fix --- Pilz.Net/Api/ApiServer.cs | 2 ++ Pilz.Net/Pilz.Net.csproj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Pilz.Net/Api/ApiServer.cs b/Pilz.Net/Api/ApiServer.cs index ef3332e..d5d00a6 100644 --- a/Pilz.Net/Api/ApiServer.cs +++ b/Pilz.Net/Api/ApiServer.cs @@ -469,6 +469,7 @@ public class ApiServer : IApiServer { Log.Info("Sending raw bytes response for " + context.Request.RawUrl); context.Response.ContentType = "application/octet-stream"; + context.Response.ContentLength64 = resultBytes.Length; context.Response.OutputStream.Write(resultBytes, 0, resultBytes.Length); context.Response.OutputStream.Flush(); } @@ -476,6 +477,7 @@ public class ApiServer : IApiServer { Log.Info("Sending stream response for " + context.Request.RawUrl); context.Response.ContentType = "application/octet-stream"; + context.Response.ContentLength64 = resultStream.Length; resultStream.CopyTo(context.Response.OutputStream); context.Response.OutputStream.Flush(); resultStream.Close(); diff --git a/Pilz.Net/Pilz.Net.csproj b/Pilz.Net/Pilz.Net.csproj index 277e119..ade6833 100644 --- a/Pilz.Net/Pilz.Net.csproj +++ b/Pilz.Net/Pilz.Net.csproj @@ -8,7 +8,7 @@ - 2.11.0 + 2.11.1