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.

[Kestrel] Allow UTF-8 characters in request URL

See original GitHub issue

We want to support incoming UTF-8 characters in request URLs. We believe other servers support this, and need to do a little research to confirm that.

Today, URL characters must be in the range 0x00-0x7F (excluding control chars). With this change, Kestrel would accept bytes over 0x7F and expose them in the URL string as percent-encoded values. For example, consider

  • Original requested URL: /aéi
  • As UTF-8 bytes: 0x2F 0x61 0xC3 0xA9 0x69
  • IHttpRequestFeature.RawTarget would return: /a%C3%A9i
  • All other derived values, which normally decode percent-encoded raw URLs, would see the original intended value: /aéi

To be clear: This behavior will be off-by-default and will be enabled via an option.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
blowdartcommented, Nov 26, 2019

And also it needs to be optional, with the default being off.

0reactions
adityamandaleekacommented, Nov 17, 2021

We haven’t gotten any requests for this feature so we’re not planning to work on it at this time. Will re-open this if there is more demand.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kestrel: error if I use URL with non-ASCII characters
1 Answer 1 ... In general, any special characters should be urlencoded. That is the only safe way to include them in the...
Read more >
ASP.NET Core 1.1 and ASP.NET Core 2.1 Not Supporting ...
If the application receives a request with a UTF-8 Non-ASCII character in the request header, it returns HTTP 400 "Invalid Request".
Read more >
Charset Encoding in ASP.NET Response - Rick Strahl
So, I have a custom handler implementation - an Ajax CallbackHandler class - that returns Json and it too generates charset=utf-8. Now some ......
Read more >
Azure is decoding characters in the URL before reaching ...
Does anyone know if there is a way to prevent Azure from decoding characters in the URL before it sends the request to...
Read more >
Fun with URL Encodings | You've Been Haacked
Quick! How many ways are there with .NET Core to encode parts of a URL? Here's a list I came up with. HttpUtility.UrlEncode...
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