You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
Scenario:
MVC uses some lists of MTHVs to determine what formats are supported. They select one from the list and use it to configure the response. Sometimes this involves modifying the value (e.g. adding charset), however this affects the value in the list and may impact matching and output for subsequent requests.
Add a copy constructor to avoid the all the string generation, string parsing, and parameter validation. NameValueHeaderValue will also require a copy constructor.
The text was updated successfully, but these errors were encountered:
Scenario:
MVC uses some lists of MTHVs to determine what formats are supported. They select one from the list and use it to configure the response. Sometimes this involves modifying the value (e.g. adding charset), however this affects the value in the list and may impact matching and output for subsequent requests.
To prevent modifications they need to make a copy of the MTHV. Right now they are using ToString and Parse to make a copy, which is least efficient way possible:
https://github.com/aspnet/Mvc/blob/eda4b16cc5dfc11528116c51e3a119c1b513e986/src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs#L181
Add a copy constructor to avoid the all the string generation, string parsing, and parameter validation. NameValueHeaderValue will also require a copy constructor.
The text was updated successfully, but these errors were encountered: