From f852765ea0d9a9d6e8cba764d30f25ea6b635c82 Mon Sep 17 00:00:00 2001 From: MDA2AV Date: Sat, 14 Nov 2026 17:44:34 +0000 Subject: [PATCH 1/2] genhttp-ioxide: build GenHTTP from the branch of Kaliumhexacyanoferrat/GenHTTP#953 GenHTTP is cloned at e3974794, the head of #953, and referenced as projects rather than the 11.3.0 packages; the commit is pinned because the bench box builds on cached layers. ioxide.pg and ioxide.timer move to 0.26.563 with the branch's ioxide. The echo handler closes a rejected frame with FrameError.CloseStatus, and frames of up to 64 KiB are accepted (MaxFrameSize). --- frameworks/genhttp-ioxide/Dockerfile | 9 +++++++ frameworks/genhttp-ioxide/Project.cs | 2 ++ .../genhttp-ioxide/Tests/EchoHandler.cs | 4 +-- frameworks/genhttp-ioxide/genhttp.csproj | 27 +++++++++++-------- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/frameworks/genhttp-ioxide/Dockerfile b/frameworks/genhttp-ioxide/Dockerfile index c45f372877..a2fe082607 100644 --- a/frameworks/genhttp-ioxide/Dockerfile +++ b/frameworks/genhttp-ioxide/Dockerfile @@ -1,4 +1,13 @@ FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build + +# GenHTTP built from source: the branch of Kaliumhexacyanoferrat/GenHTTP#953 +# (update-ioxide-0.20.396) rather than the 11.3.0 release. Pinned to one commit, +# because a build on cached layers would otherwise keep whichever it cloned first. +ARG GENHTTP_COMMIT=e3974794fe0eea42d7387c56ed36ca98b99e0595 +RUN git init -q /genhttp \ + && git -C /genhttp fetch -q --depth 1 https://github.com/Kaliumhexacyanoferrat/GenHTTP.git "$GENHTTP_COMMIT" \ + && git -C /genhttp checkout -q FETCH_HEAD + WORKDIR /src/app COPY genhttp.csproj ./ diff --git a/frameworks/genhttp-ioxide/Project.cs b/frameworks/genhttp-ioxide/Project.cs index ddafffa1c0..c0d4719a82 100644 --- a/frameworks/genhttp-ioxide/Project.cs +++ b/frameworks/genhttp-ioxide/Project.cs @@ -60,8 +60,10 @@ private static LayoutBuilder AddStaticFiles(this LayoutBuilder app) private static LayoutBuilder AddWebsocket(this LayoutBuilder app) { + // Frames of up to 64 KiB, rather than the 16 KiB default var websocket = Websocket.Imperative() .DoNotAllocateFrameData() + .MaxFrameSize(64 * 1024) .Handler(new EchoHandler()); return app.Add("ws", websocket); diff --git a/frameworks/genhttp-ioxide/Tests/EchoHandler.cs b/frameworks/genhttp-ioxide/Tests/EchoHandler.cs index 586bb3d254..6760fa88dd 100644 --- a/frameworks/genhttp-ioxide/Tests/EchoHandler.cs +++ b/frameworks/genhttp-ioxide/Tests/EchoHandler.cs @@ -46,9 +46,9 @@ private static async ValueTask HandleAsync(IWebsocketFrame frame, IImperat return false; case FrameType.Error: - if (frame.IsError(out var error) && error.ErrorType is not (FrameErrorType.Canceled or FrameErrorType.IncompleteForever)) + if (frame.IsError(out var error) && error.CloseStatus is { } status) { - await TryCloseAsync(connection, error.ErrorType == FrameErrorType.PayloadTooLarge ? (ushort)1009 : (ushort)1002); + await TryCloseAsync(connection, status); } return false; diff --git a/frameworks/genhttp-ioxide/genhttp.csproj b/frameworks/genhttp-ioxide/genhttp.csproj index 5fede8b6ff..fba764d372 100644 --- a/frameworks/genhttp-ioxide/genhttp.csproj +++ b/frameworks/genhttp-ioxide/genhttp.csproj @@ -15,22 +15,27 @@ 0 - + + + /genhttp + + - - - - - - - + + + + + + + - + - + From 533ae33f664715b75da1d15a20247a895cac27a9 Mon Sep 17 00:00:00 2001 From: MDA2AV Date: Sat, 14 Nov 2026 18:06:51 +0000 Subject: [PATCH 2/2] genhttp-ioxide: pin GenHTTP to 28b0cd10, which fixes chunked request bodies over TLS --- frameworks/genhttp-ioxide/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/genhttp-ioxide/Dockerfile b/frameworks/genhttp-ioxide/Dockerfile index a2fe082607..4f15e0e31a 100644 --- a/frameworks/genhttp-ioxide/Dockerfile +++ b/frameworks/genhttp-ioxide/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build # GenHTTP built from source: the branch of Kaliumhexacyanoferrat/GenHTTP#953 # (update-ioxide-0.20.396) rather than the 11.3.0 release. Pinned to one commit, # because a build on cached layers would otherwise keep whichever it cloned first. -ARG GENHTTP_COMMIT=e3974794fe0eea42d7387c56ed36ca98b99e0595 +ARG GENHTTP_COMMIT=28b0cd107bb36321408a3a1f892f3bb45225e9d7 RUN git init -q /genhttp \ && git -C /genhttp fetch -q --depth 1 https://github.com/Kaliumhexacyanoferrat/GenHTTP.git "$GENHTTP_COMMIT" \ && git -C /genhttp checkout -q FETCH_HEAD