From bd0ae08aa7b43f67a6869d9058fa8659c9ca8db3 Mon Sep 17 00:00:00 2001 From: Dennis Kieselhorst Date: Fri, 20 Dec 2024 11:22:28 +0100 Subject: [PATCH] fix: content type for v1 payload should be retrieved from multi value headers (#1193) --- .../serverless/proxy/spring/AwsSpringHttpProcessingUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/AwsSpringHttpProcessingUtils.java b/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/AwsSpringHttpProcessingUtils.java index 01074f86..2f547a32 100644 --- a/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/AwsSpringHttpProcessingUtils.java +++ b/aws-serverless-java-container-springboot3/src/main/java/com/amazonaws/serverless/proxy/spring/AwsSpringHttpProcessingUtils.java @@ -126,7 +126,7 @@ private static HttpServletRequest generateRequest1(String request, Context lambd } populateContentAndContentType( v1Request.getBody(), - v1Request.getHeaders().get(HttpHeaders.CONTENT_TYPE), + v1Request.getMultiValueHeaders().getFirst(HttpHeaders.CONTENT_TYPE), v1Request.isBase64Encoded(), httpRequest );