camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Hu (JIRA)" <>
Subject [jira] [Created] (CAMEL-9462) HTTP 1.1 Host header be dealt wrongly in proxy & load balancer
Date Wed, 30 Dec 2015 15:27:49 GMT
Ian Hu created CAMEL-9462:

             Summary: HTTP 1.1 Host header be dealt wrongly in proxy & load balancer
                 Key: CAMEL-9462
             Project: Camel
          Issue Type: Bug
          Components: camel-http, camel-http4
    Affects Versions: 2.11.0, 2.10.3, 2.9.5
            Reporter: Ian Hu

I have wrote code below make camel as a load balancer, but camel-http4(and the camel-http,
etc) deal the http header Host wrongly, it replace the Host header with the host name of the
backend of balancer, that make the backend generate the wrong link.

import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.model.RouteDefinition;

public class Main {
    public static void main(String[] args) throws Exception {
        DefaultCamelContext context = new DefaultCamelContext();

        RouteDefinition route = new RouteDefinition();


I have view the code and found a fix of [](See
the commit), it's commits simply removed the host header [].
and I really do not think it should be dealt like that.

Some backend will use the Host header to generate link, and when the Host header removed and
then it be set to the backend's host, the backend got the wrong Host, and generate the wrong

I expect the link should be http://localhost:8080/web but it generate
or when I view the page with the url http://localhost:8080

This message was sent by Atlassian JIRA

View raw message