Skip to content

Phase 1, Task 1: Fix encoder finalization in process_through_compression #568

@aram356

Description

@aram356

Parent: #563
Phase: #566

Summary

process_through_compression uses flush() then drop(encoder) which silently swallows finalization errors. This is a prerequisite for Task 2 (moving gzip to this path) — without it, gzip would regress from working finish() to broken drop().

Changes

  • Change signature from W (by value) to &mut W so caller retains ownership for finish()
  • Remove drop(encoder) — caller calls finish() explicitly
  • Update process_deflate_to_deflate and process_brotli_to_brotli callers
  • Add deflate round-trip correctness test

File: crates/trusted-server-core/src/streaming_processor.rs:334-393

Plan

See docs/superpowers/plans/2026-03-25-streaming-response.md — Task 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions