-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
On IIS (ANCM) : when a request contains a header such as foo:Québec, IIS decodes it as Qu�bec. (The "é" is replaced with codepoint U+FFFD). It is possible to enable Latin1 decoding using AppContext.SetSwitch("Microsoft.AspNetCore.Server.IIS.Latin1RequestHeaders", isEnabled: true);
Please see: #22675
On Kestrel : when a request contains a header such as foo:Québec, Kestrel rejects it outright as 400.0 (Bad Request). It is possible to enable Latin1 decoding using KestrelServerOptions.RequestHeaderEncodingSelector
property : https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.core.kestrelserveroptions.requestheaderencodingselector?view=aspnetcore-5.0
However, on HttpSysServer, the option to enable Latin1 decoding is not present.
Describe the solution you'd like
An option to enable Latin1 request header decoding on HttpSysServer similar to Kestrel and IIS (ANCM)