gzip
gzip copied to clipboard
http: ensure correct header handling
Summary
During processing by middleware, the gzip headers from the original response were removed, causing the loss of their original integrity.
Changes
- Introduced
headerWritedflag 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.