We have tomcat with Jersey serving APIs behind NGINX. A new streaming API we have developed worked great when we call Tomcat directly, but started getting no response when calling it through NGINX.
Looking at NGINX logs we got:
upstream sent invalid chunked response while reading upstream
We have solved the issue by adding the following to NGINX:
proxy_http_version 1.1
I guess NGINX proxies traffic by default with http version 1.0, but chunked transfer encoding is a http 1.1 feature.