From 7edd4f8108aad1700a2192ede2c2ac55c6e393da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Stormacq?= Date: Sun, 1 Jun 2025 18:31:02 +0200 Subject: [PATCH] [core] Fix LocalServer failure to handle large body request (Issue #481) (#504) Fix https://github.com/swift-server/swift-aws-lambda-runtime/issues/481 --- Sources/AWSLambdaRuntime/Lambda+LocalServer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift b/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift index baa08a44..56786697 100644 --- a/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift +++ b/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift @@ -238,7 +238,7 @@ private struct LambdaHTTPServer { requestHead = head case .body(let body): - requestBody = body + requestBody.setOrWriteImmutableBuffer(body) case .end: precondition(requestHead != nil, "Received .end without .head")