diff --git a/src/Http/Http/src/Features/ResponseCookiesFeature.cs b/src/Http/Http/src/Features/ResponseCookiesFeature.cs
index f7a6f2d40138..7e3cabb28e00 100644
--- a/src/Http/Http/src/Features/ResponseCookiesFeature.cs
+++ b/src/Http/Http/src/Features/ResponseCookiesFeature.cs
@@ -26,8 +26,13 @@ public class ResponseCookiesFeature : IResponseCookiesFeature
/// and the .
///
public ResponseCookiesFeature(IFeatureCollection features)
- : this(features, builderPool: null)
{
+ if (features == null)
+ {
+ throw new ArgumentNullException(nameof(features));
+ }
+
+ _features.Initalize(features);
}
///
@@ -38,6 +43,7 @@ public ResponseCookiesFeature(IFeatureCollection features)
/// and the .
///
/// The , if available.
+ [Obsolete("This constructor is obsolete and will be removed in a future version.")]
public ResponseCookiesFeature(IFeatureCollection features, ObjectPool? builderPool)
{
if (features == null)