From 56dc66be4ec14ad8a0af90643113a2b00dcc55f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ram=C3=B3n=20Barro?= <57114521+KurogamiLight3303@users.noreply.github.com> Date: Thu, 16 Oct 2025 02:59:29 -0400 Subject: [PATCH] Reset Stream Position back to 0 Features from ASP Net Core like Output cache aren't working probably because of this --- .../APIGatewayHttpApiV2ProxyFunction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs b/Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs index a7bcd519d..debca2025 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer/APIGatewayHttpApiV2ProxyFunction.cs @@ -257,7 +257,7 @@ protected override APIGatewayHttpApiV2ProxyResponse MarshallResponse(IHttpRespon } (response.Body, response.IsBase64Encoded) = Utilities.ConvertAspNetCoreBodyToLambdaBody(responseFeatures.Body, rcEncoding); - + responseFeatures.Body.Position = 0L; } PostMarshallResponseFeature(responseFeatures, response, lambdaContext);