From 01199ca9fa30dad87dc34038a9e9c12ba38ad009 Mon Sep 17 00:00:00 2001 From: Jens Schulze Date: Wed, 1 Nov 2023 11:13:52 +0100 Subject: [PATCH] fix duplicate content-type header in AHC client --- .../com/commercetools/http/asynchttp/CtAsyncHttpClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/CtAsyncHttpClient.java b/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/CtAsyncHttpClient.java index cfdccd5edb1..e729ed302e7 100644 --- a/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/CtAsyncHttpClient.java +++ b/commercetools/commercetools-async-http-client/src/main/java/com/commercetools/http/asynchttp/CtAsyncHttpClient.java @@ -168,7 +168,7 @@ private Request asAhcRequest(final ApiHttpRequest request) { mediaType = AsciiString .of(Objects.requireNonNull(request.getHeaders().getFirst(ApiHttpHeaders.CONTENT_TYPE))); } - builder.addHeader(ApiHttpHeaders.CONTENT_TYPE, mediaType); + builder.setHeader(ApiHttpHeaders.CONTENT_TYPE, mediaType); }); return builder.build(); }