"unsupported transfer encoding" error in istio proxy

It is not the casing of the header that is causing issues, but the fact that the headers are duplicate.

In the scenario we are using:

We are sending a POST request to a container running in a pod. Let’s say this is app1.
This triggers a POST request from app1 to app2. App2 is running in another container in a different pod. App2 sends the POST response back to app1, and app1 sends a POST response back to the user.
Both pods have the istio-proxy sidecars running for these applications.

We noticed that when using Tomcat as a webcontainer for our docker images, the response header Transfer-Encoding: chunked is added by both app2 when sending the response back to app1, and by app1 when sending the response back to the user. But the header from app2 is not removed in this last step and is still present. I would expect that the tomcat in app1 recognizes that it should not sent this header (originating from app2) back to the user. It should drop this header as it was only valid for the HTTP response from app2 to app1.

When using Undertow (at least for app1) we no longer see the duplicate header.

I hope this makes sense, I find it a bit hard to explain :slight_smile:

Regards,
Jasper