Thanks for all the input. Clearly we made a bad design decision a few years back. It is clear to me how to fix it and have a more compliant solution.

Regards

Från: Stuart Douglas <sdouglas@redhat.com>
Skickat: den 5 mars 2020 21:31
Till: Jocke Eriksson <jockeeriksson@msn.com>
Kopia: undertow-dev@lists.jboss.org <undertow-dev@lists.jboss.org>
Ämne: Re: [undertow-dev] Proxy and chunking.
 


On Thu, 5 Mar 2020 at 20:29, Jocke Eriksson <jockeeriksson@msn.com> wrote:
Hi devs and followers we have a problem and maybe someone on this list have some input.

We use undertow as an API gateway in front of JBoss application servers.
One API we have is responding with a chunked response, and the receiving side is expecting that each chunk is a valid JSon object.
When we analyze the TCP dumps it looks like some chunks are not the full JSon response we are expecting. 

This is a terrible idea, chunking is an implementation detail of the HTTP transport layer. Proxies are allowed to change the chunk boundaries.
 

So the question is could this be a problem in the gateway?

I found a flag called PRE_CHUNKED_RESPONSE could this be the answer. 
If so, how do we apply it in a proxy handler?

You can't really, the client the proxy uses will strip the chunk data, so the proxy will never see it, this would be a feature request.

Stuart
 

Regards Joakim.
_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev