-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Obsolete IPNetwork #46157
Comments
Thanks for contacting us. We're moving this issue to the |
This should no longer be blocked, right? I can make a PR for this if you'd like. There are 3 concrete changes, right?
That should keep all existing usage working, I think. |
I started working on this proactively, and discovered that the HttpOverrides version accepts any IPAddress in the constructors (and masks it during each comparison), while the System.Net version only accepts a value that is a valid network prefix given the accompanying prefix length (which I knew, but I initially assumed the original HttpOverrides edition worked the same way). This obviously makes most of the tests go haywire since the test data is "bad" according to the new version. So I'd propose the following additional changes:
But I suspect this difference might be too much of a breaking change in the first place to mark it obsolete? |
The BCL is planning a replacement for this type: dotnet/runtime#79946
We should consume theirs when available and obsolete ours.
aspnetcore/src/Middleware/HttpOverrides/src/IPNetwork.cs
Line 13 in 83d6c56
aspnetcore/src/Middleware/HttpOverrides/src/ForwardedHeadersOptions.cs
Line 73 in 83d6c56
Consider adding an implicit converter to minimize the breaking changes in the short term.
The text was updated successfully, but these errors were encountered: