My original problem is the fact, that in a Jetty based proxy the consumer sets the header "Transfer-Encoding: chunked" to the backend request for a GET request without body. This is not necessary, since there is no body, but the http component puts that null body into a InputStreamCache/HttpInputOverHTTP. This happens, because there is no content-length header set (which means it's "-1"):
The only workaround I found, is to set "eagerCheckContentAvailable=true". Unfortunately the JettyHttpEndpoint9 does not transfer this setting to the http binding and therefor my problem can't be fixed. (Ok, I found another workaround, but it's really ugly.)
I found that problem using camel-2.17. In the current master branch, there is an open TODO to transfer this option:
For me this fixed the problem in my "test".
I didn't manage to build a good test, since that header is set deeply inside "org.eclipse.jetty.client.HttpConnection.normalizeRequest(Request)", but it's easy to reproduce it, by running a simple proxy and enable DEBUG log for "org.eclipse.jetty.client.HttpSender":
Inside the log a http header like will be logged:
This is the test I used to reproduce and debug that problen