-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Make HttpResponseMessage.Content non-nullable #35910
Conversation
Tagging subscribers to this area: @dotnet/ncl |
Do we need to change WinHttpHandler as well? |
This didn't actually change SocketsHttpHandler, just HttpResponseMessage.Content's getter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, you might be already aware of, anyway just in case there is some test failures in Microsoft.Extensions.Http.Logging.RedactedLogValueIntegrationTest.
seems related
probably use of EmptyContent.
|
ecf9da9
to
5c84d60
Compare
Yup. Thanks. |
5c84d60
to
b9a2333
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@stephentoub As noted in dotnet/docs#25953, it appears that this is a breaking change. Can you confirm? |
Any bug fix can break something, but this doesn't qualify as a breaking change as far as our definition of the term applies. To my knowledge the behavior of this member was never documented as to when it returned null or didn't, and we don't consider returning non-null when we previously returned null to be a "breaking change", even though, yes, it could break code checking for null (just as we don't consider changing something that was returning instances of type A to instance return an instance of type B that derives from A to be breaking, even though it can of course break someone). On top of that, this would really only affect testing scenarios, as HttpResponseMessage.Content never returned null for responses coming back from HttpMessageHandler/SocketsHttpHandler/WinHttpHandler/etc. |
Fixes #35859
cc: @scalablecory, @davidsh, @buyaa-n