gpt4 book ai didi

tomcat - NGINX 错误 : upstream sent invalid chunked response while reading upstream

转载 作者:行者123 更新时间:2023-11-28 21:48:44 26 4
gpt4 key购买 nike

我们在 NGINX 后面有带有 Jersey 服务 API 的 tomcat。我们开发的一个新的流式 API 在我们直接调用 Tomcat 时运行良好,但在通过 NGINX 调用它时开始没有响应。

查看我们得到的 NGINX 日志:

上游在读取上游时发送了无效的分块响应

最佳答案

我们通过向 NGINX 添加以下内容解决了这个问题:

proxy_http_version 1.1

我猜 NGINX 默认使用 http 版本 1.0 代理流量,但是分块传输编码是 http 1.1 的一个特性。

https://forum.nginx.org/read.php?2,247883,247906#msg-247906

关于tomcat - NGINX 错误 : upstream sent invalid chunked response while reading upstream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49451775/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com