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

MediaTypeHeaderValue should ignore unknow parameters in MIME types #38264

Open
enzian opened this issue Jun 23, 2020 · 3 comments
Open

MediaTypeHeaderValue should ignore unknow parameters in MIME types #38264

enzian opened this issue Jun 23, 2020 · 3 comments
Labels
area-System.Net.Http backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity
Milestone

Comments

@enzian
Copy link

enzian commented Jun 23, 2020

Description

When System.Net.Http.Headers.MediaTypeHeaderValue(string) is used to parse a MIME type which contains an unnecessary parameter like in image/png;charset=UTF-8 a format exception is thrown. While this modifier makes admittedly little sense, the IEEE spec explicity states that "MIME implementations must also ignore any parameters whose names they do not recognize"

Configuration

Reproduced in netcoreapp3.1, SDK version 3.1.300

Regression

[Fact]
public async Task TestImageWithCharset()
{
    new MediaTypeHeaderValue("image/png;charset=UTF-8");
}
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Numerics untriaged New issue has not been triaged by the area owner labels Jun 23, 2020
@ghost
Copy link

ghost commented Jun 23, 2020

Tagging subscribers to this area: @tannergooding
Notify danmosemsft if you want to be subscribed.

@ghost
Copy link

ghost commented Jun 23, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@scalablecory scalablecory added this to the Future milestone Jun 25, 2020
@scalablecory scalablecory removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net.Http backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity
Projects
None yet
Development

No branches or pull requests

4 participants