gzip icon indicating copy to clipboard operation
gzip copied to clipboard

http: ensure correct header handling

Open StounhandJ opened this issue 1 month ago • 0 comments

Summary

During processing by middleware, the gzip headers from the original response were removed, causing the loss of their original integrity.

Changes

  • Introduced headerWrited flag to prevent duplicate Content-Encoding/Vary headers.
  • Removed obsolete removeGzipHeaders method.
  • Updated tests to check correct behavior of Vary and ETag headers.

Motivation

In general, this is not a functional update, but is aimed at improving the readability and correctness of working with HTTP headers, including ETag and Vary, with gzip compression.

Impact

  • No functional changes to response compression.
  • Headers are now handled more consistently.
  • Tests updated to validate new header logic.

StounhandJ avatar Nov 13 '25 11:11 StounhandJ