You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The infrastructure backing HttpResponse bodies has changed. If you're using HttpResponse directly you should not need to make any code changes. Read further if you were wrapping or replacing HttpResponse.Body or accessing HttpContext.Features.
Version introduced
3.0
Old behavior
There were three APIs associated with the response body: IHttpResponseFeature.Body, IHttpSendFileFeature.SendFileAsync, and IHttpBufferingFeature.DisableResponseBuffering
New behavior
In ASP.NET Core if you replace HttpResponse.Body it will now replace the entire IHttpResponseBodyFeature with a wrapper around your given stream using StreamResponseBodyFeature to provide default implementations for all of the expected APIs. Setting back the original stream will undo this change.
Reason for change
Consolidating the response body APIs onto a single new feature interface.
Recommended action
Use IHttpResponseBodyFeature where you previously were using IHttpResponseFeature.Body, IHttpSendFileFeature, or IHttpBufferingFeature.
HttpResponse body infrastructure changes
The infrastructure backing HttpResponse bodies has changed. If you're using HttpResponse directly you should not need to make any code changes. Read further if you were wrapping or replacing HttpResponse.Body or accessing HttpContext.Features.
Version introduced
3.0
Old behavior
There were three APIs associated with the response body:
IHttpResponseFeature.Body
,IHttpSendFileFeature.SendFileAsync
, andIHttpBufferingFeature.DisableResponseBuffering
New behavior
In ASP.NET Core if you replace
HttpResponse.Body
it will now replace the entireIHttpResponseBodyFeature
with a wrapper around your given stream usingStreamResponseBodyFeature
to provide default implementations for all of the expected APIs. Setting back the original stream will undo this change.Reason for change
Consolidating the response body APIs onto a single new feature interface.
Recommended action
Use
IHttpResponseBodyFeature
where you previously were usingIHttpResponseFeature.Body
,IHttpSendFileFeature
, orIHttpBufferingFeature
.Category
ASP.NET Core
Affected APIs
IHttpResponseFeature.Body
IHttpSendFileFeature
IHttpBufferingFeature
Issue metadata
The text was updated successfully, but these errors were encountered: