-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/7.0] Default media type used when 'null' is passed to StringContent #81506 #83425
[release/7.0] Default media type used when 'null' is passed to StringContent #81506 #83425
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBackport of #81722 to release/7.0 /cc @antonfirsov @slovely Customer ImpactTestingRiskIMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
This is annoying enough for customers (see updated Servicing template), that we should consider it for 7.0 servicing. Marking as such. |
I'm retargeting this PR to the new Repo maintainers will now be allowed to merge their own servicing PR as long as it meets the requirements:
The new process is described here: runtime/docs/project/library-servicing.md. The infra team will be actively monitoring servicing PRs to ensure all requirements are met and to help with any issues. Let me know if you have any questions. |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
Test failures are unrelated.
All requirements listed in #83425 (comment) are met, I think we can merge this. |
@carlossanlop I don't have the rights to merge this. |
Fixed. Is the squash and merge button enabled for you now, @antonfirsov? We had some weird issues with GitHub Actions yesterday and the new |
@carlossanlop no, this is what I see: |
Ah, we had an unnecessary restriction, I removed it. Can you please refresh? Is the "squash and merge" button enabled for you now, @antonfirsov? |
@carlossanlop was good now, merged, thanks for the help! |
Backport of #81722 to release/7.0
Fixes #81506
/cc @antonfirsov @slovely
Customer Impact
We introduced an unintentional breaking change/regression in one of
StringContent
's constructors in .NET 7.0: passingnull
to the argstring contentType
leads to an exception.In .NET 6.0 we would instead use default value
text/plain
- see .NET 6.0 code.While it is easy to work around (check for null and pass 'text/plain' from user code), it has hit at least 3 customers (one of them was RestSharp - set of their customers hit it), so it is annoying, and it requires customers to change their code.
Testing
Targeted test case added in the PR.
Risk
Low. This is a fairly trivial change.