You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/09/09 06:43:35 UTC

[camel-quarkus] 01/03: Remove QuarkusVertxHttpBinding

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit f4d4a7917bf0c6b5a3516dece96d9cbb5338d47d
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Sep 9 07:39:13 2020 +0100

    Remove QuarkusVertxHttpBinding
    
    Fixes #1675
---
 .../vertx/http/CamelVertxHttpRecorder.java          | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
index e59be03..2315134 100644
--- a/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
+++ b/extensions/vertx-http/runtime/src/main/java/org/apache/camel/quarkus/component/vertx/http/CamelVertxHttpRecorder.java
@@ -19,14 +19,7 @@ package org.apache.camel.quarkus.component.vertx.http;
 import io.quarkus.runtime.RuntimeValue;
 import io.quarkus.runtime.annotations.Recorder;
 import io.vertx.core.Vertx;
-import io.vertx.core.buffer.Buffer;
-import io.vertx.ext.web.client.HttpRequest;
-import org.apache.camel.Exchange;
-import org.apache.camel.component.vertx.http.DefaultVertxHttpBinding;
 import org.apache.camel.component.vertx.http.VertxHttpComponent;
-import org.apache.camel.spi.HeaderFilterStrategy;
-import org.apache.camel.support.ExchangeHelper;
-import org.apache.camel.util.ObjectHelper;
 
 @Recorder
 public class CamelVertxHttpRecorder {
@@ -34,20 +27,6 @@ public class CamelVertxHttpRecorder {
     public RuntimeValue<?> createVertxHttpComponent(RuntimeValue<Vertx> vertx) {
         VertxHttpComponent component = new VertxHttpComponent();
         component.setVertx(vertx.getValue());
-        component.setVertxHttpBinding(new QuarkusVertxHttpBinding());
         return new RuntimeValue<>(component);
     }
-
-    // TODO: Remove when https://issues.apache.org/jira/browse/CAMEL-15495 is resolved
-    static class QuarkusVertxHttpBinding extends DefaultVertxHttpBinding {
-        @Override
-        public void populateRequestHeaders(Exchange exchange, HttpRequest<Buffer> request, HeaderFilterStrategy strategy) {
-            super.populateRequestHeaders(exchange, request, strategy);
-
-            String contentType = ExchangeHelper.getContentType(exchange);
-            if (ObjectHelper.isNotEmpty(contentType)) {
-                request.putHeader(Exchange.CONTENT_TYPE, contentType);
-            }
-        }
-    }
 }