Allow ANCM in-process to interpret request headers as Latin1 encoded
See original GitHub issueSimilar issue with Kestrel: https://github.com/dotnet/aspnetcore/issues/17399
Related PR for the fix in Kestrel: https://github.com/dotnet/aspnetcore/pull/18255
This is a very similar ask that we had for Latin1 support in Kestrel.
In a 3.1 patch we should provide:
- A config setting to change the default encoding to Latin1
- When enabled, ANCM will widen each incoming byte to a UTF-16 character and build a
string
from that set of characters, instead of interpreting bytes as UTF-8. - We will continue to reject control characters from the ASCII set (0x00-0x1F and 0x7F), but not reject control characters from the widened Latin1 set (because they would collide with other interpretations of this data, like UTF-8).
This would allow a consumer to reinterpret the data in this string as a UTF-8 sequence if desired.
In 5.0 we’ll look at broader work to improve this experience. The 3.1 goals are scoped down to specific requests we’ve received.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to fix error "ANCM In-Process Handler Load Failure"?
Open the .csproj file and under Project > PropertyGroup > AspNetCoreHostingModel, change the value “InProcess” to “OutOfProcess”.
Read more >ASP.NET Core 1.1 and ASP.NET Core 2.1 Not Supporting ...
An example value passed in the request header is: "vvölker" ... The latin1 encoding would also allow UTF-8 bytes, it just wouldn't decode ......
Read more >What's new in ASP.NET Core 6.0
Support for Latin1 encoded request headers in HttpSysServer. HttpSysServer now supports decoding request headers that are Latin1 encoded by ...
Read more >UTF-8 in HTTP headers
So, if we transfer UTF-8 messages, but do not assign encoding in headers, they will be read as if they were encoded with...
Read more >Accept-Encoding - HTTP - MDN Web Docs
The Accept-Encoding request HTTP header indicates the content encoding (usually a compression algorithm) that the client can understand.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Costing as medium though as things always take longer than expected 😄
Yes, sounds good. Thanks @jkotalik.