Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Kestrel return non-ASCII headers in response #26334

Closed
yunfandev opened this issue Sep 25, 2020 · 6 comments
Closed

Add support for Kestrel return non-ASCII headers in response #26334

yunfandev opened this issue Sep 25, 2020 · 6 comments
Labels
affected-few This issue impacts only small number of customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-minor This label is used by an internal tool
Milestone

Comments

@yunfandev
Copy link

Describe the bug

When I try to create a reverse proxy using asp.net core with the library reverse-proxy for my blog, which has the following response header:

access-control-allow-credentials: true
access-control-allow-origin: *
cache-control: public, max-age=0
content-encoding: gzip
content-type: text/html; charset=utf-8
date: Fri, 25 Sep 2020 10:15:43 GMT
etag: W/"9127-u+4Jv+RfD2erbftmcMqr2DT5eig"
status: 304
strict-transport-security: max-age=315360000; includeSubDomains; preload
vary: Origin
x-powered-by: traefik(made with ❤️ with go)

It throws an expectation, InvalidOperationException: Invalid non-ASCII or control character in header: 0x00E2 😂😂😂

To Reproduce

Set any non-ASCII header in the response.

Exceptions (if any)

InvalidOperationException: Invalid non-ASCII or control character in header: 0x00E2

Further technical details

.NET Core SDK (reflecting any global.json):
Version:   3.1.402
Commit:    9b5de826fd

Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19042
OS Platform: Windows
RID:         win10-x64
@yunfandev yunfandev changed the title Support Add support for Kestrel return non-ASCII headers in response Add support for Kestrel return non-ASCII headers in response Sep 25, 2020
@yunfandev
Copy link
Author

Origin issue: dotnet/yarp#440

@ghost
Copy link

ghost commented Sep 25, 2020

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@blowdart
Copy link
Contributor

If we do this, it needs to be off by default, because, as we all known, that is, as the error indicates, an illlegal header, which should be rejected.

@yunfandev
Copy link
Author

yunfandev commented Sep 26, 2020

@blowdart

Agree. As long as it can be manually turned on when needed.

@yunfandev
Copy link
Author

It looks like there is already a similar issue: Allow non-ASCII characters in response header values

@Tratcher Tratcher added affected-few This issue impacts only small number of customers enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-minor This label is used by an internal tool labels Oct 6, 2020 — with ASP.NET Core Issue Ranking
@davidfowl
Copy link
Member

Closing as dupe

@ghost ghost locked as resolved and limited conversation to collaborators Apr 27, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-few This issue impacts only small number of customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-minor This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

6 participants