question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow ANCM in-process to interpret request headers as Latin1 encoded

See original GitHub issue

Similar 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:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jkotalikcommented, Jun 8, 2020

Costing as medium though as things always take longer than expected 😄

0reactions
Pilchiecommented, Jun 9, 2020

Yes, sounds good. Thanks @jkotalik.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found