Skip to content

DecompressionHandler could move the headers more efficiently #63632

Closed

Description

@MihaZupan

DecompressionHandler will replace the Content on the HttpResponseMesasge with a new one wrapping the decompression stream. It also copies over all the headers from the response.

Since DecompressionHandler is internal and the user can never observe the original response content, we could assign the header collection to the new content instead of copying all the values.

We do something similar for trailing headers already:

internal void StoreReceivedTrailingHeaders(HttpResponseHeaders headers)

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 11, 2022
  2. added
    enhancementProduct code improvement that does NOT require public API changes/additions
    and removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 13, 2022
  3. added this to the Future milestone on Jan 13, 2022
  4. karelz commented on Jan 13, 2022

    @karelz
    Member

    Triage: Possible to do, unlikely to have visible perf impact.

  5. added
    in-prThere is an active PR which will close this issue when it is merged
    on Dec 20, 2025
  6. modified the milestones: Future, 11.0.0 on Dec 20, 2025
  7. locked and limited conversation to collaborators on Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsin-prThere is an active PR which will close this issue when it is mergedtenet-performancePerformance related issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions