Skip to content

DecompressionHandler could move the headers more efficiently #63632

@MihaZupan

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)

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