-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtenet-performancePerformance related issuePerformance related issue
Milestone
Description
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.
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/DecompressionHandler.cs
Line 121 in 59b55a2
| Headers.AddHeaders(originalContent.Headers); |
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:
runtime/src/libraries/System.Net.Http/src/System/Net/Http/HttpResponseMessage.cs
Line 121 in 59b55a2
| internal void StoreReceivedTrailingHeaders(HttpResponseHeaders headers) |
Metadata
Metadata
Assignees
Labels
area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedtenet-performancePerformance related issuePerformance related issue