gal*_*ben 3 tomcat nginx jersey chunked-encoding
我们的tomcat公司在NGINX之后提供Jersey服务的API。当我们直接调用Tomcat时,我们开发的新的流API效果很好,但是通过NGINX调用它时却没有任何响应。
查看NGINX日志,我们得到:
upstream sent invalid chunked response while reading upstream
我们通过向NGINX添加以下内容解决了该问题:
proxy_http_version 1.1
我猜默认情况下,NGINX使用HTTP版本1.0代理流量,但是分块传输编码是HTTP 1.1功能。
https://forum.nginx.org/read.php?2,247883,247906#msg-247906
就我而言,仅设置 proxy_http_version 1.1 不起作用。我必须设置这些 -
proxy_http_version 1.1;
proxy_set_header Connection "";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2384 次 |
| 最近记录: |