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 1/2] 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); From 5aaa77b0646b1a3c0b6d6c0fefc3ef0666f81aea Mon Sep 17 00:00:00 2001 From: Garrett Beatty Date: Fri, 17 Apr 2026 19:52:37 -0400 Subject: [PATCH 2/2] add dev config --- .autover/changes/pr2150-reset-stream-position.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .autover/changes/pr2150-reset-stream-position.json diff --git a/.autover/changes/pr2150-reset-stream-position.json b/.autover/changes/pr2150-reset-stream-position.json new file mode 100644 index 000000000..a993e5c9b --- /dev/null +++ b/.autover/changes/pr2150-reset-stream-position.json @@ -0,0 +1,11 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.AspNetCoreServer", + "Type": "Patch", + "ChangelogMessages": [ + "Reset the response body stream position to 0 after converting the ASP.NET Core response body to the Lambda response." + ] + } + ] +}