Skip to content

Fix Cadente chunked response framing with non-zero offsets#41

Merged
CypherPotato merged 1 commit into
mainfrom
codex/fix-cadente-malformed-response-framing
May 25, 2026
Merged

Fix Cadente chunked response framing with non-zero offsets#41
CypherPotato merged 1 commit into
mainfrom
codex/fix-cadente-malformed-response-framing

Conversation

@CypherPotato
Copy link
Copy Markdown
Member

Motivation

  • Repair a bug in Cadente where chunked responses declared an incorrect chunk size (using count - offset) and could emit the terminal chunk on empty writes, which can corrupt HTTP/1.1 chunk framing and lead to response desynchronization.

Description

  • Update cadente/Sisk.Cadente/Streams/HttpChunkedWriteStream.cs so Write(byte[] buffer, int offset, int count) uses count for the chunk-size header and treats count == 0 as a no-op, while leaving the terminal 0\r\n\r\n emission in Dispose intact.

Testing

  • Ran dotnet test tests/Sisk.Core/tests.csproj --no-restore which completed successfully.
  • Running dotnet test from the repo root was not applicable because there is no solution/project file at /workspace/core, producing an MSBUILD error.

Codex Task

@CypherPotato CypherPotato merged commit 5701baf into main May 25, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant