From 78129c376d84cd4d6e512f87600ce43a723b71c0 Mon Sep 17 00:00:00 2001 From: Israel Perales Date: Tue, 3 Aug 2021 03:45:00 -0500 Subject: [PATCH] Bugfix #712 https://github.com/spring-cloud/spring-cloud-function/issues/712 --- .../cloud/function/adapter/gcp/FunctionInvoker.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-gcp/src/main/java/org/springframework/cloud/function/adapter/gcp/FunctionInvoker.java b/spring-cloud-function-adapters/spring-cloud-function-adapter-gcp/src/main/java/org/springframework/cloud/function/adapter/gcp/FunctionInvoker.java index ad25bc17e..4dff00d8d 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-gcp/src/main/java/org/springframework/cloud/function/adapter/gcp/FunctionInvoker.java +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-gcp/src/main/java/org/springframework/cloud/function/adapter/gcp/FunctionInvoker.java @@ -102,6 +102,7 @@ public void service(HttpRequest httpRequest, HttpResponse httpResponse) throws E for (Entry header : result.getHeaders().entrySet()) { httpResponse.appendHeader(header.getKey(), header.getValue().toString()); } + httpRequest.getContentType().ifPresent(contentType -> httpResponse.setContentType(contentType)); } }