DongPoJuShi opened a new issue, #5788:
URL: https://github.com/apache/shenyu/issues/5788
### Question
我有一个文件下载接口,文件无法提前获取大小, 使用curl -i 查看响应头信息,会添加Transfer-Encoding头
curl -i http://127.0.0.1:8081/sso/file/download
HTTP/1.1 200 OK
transfer-encoding: chunked
Set-Cookie: JSESSIONID=586720F3737BB4AC4151B8CF05F01BEF; Path=/; HttpOnly
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Date: Fri, 15 Nov 2024 05:53:43 GMT
访问经过网关的接口,会再添加transfer-encoding头
url -i http://127.0.0.1:8080/sso/file/download
HTTP/1.1 200 OK
transfer-encoding: chunked
Set-Cookie: JSESSIONID=3286922940F3613FF9F17EFB5F3E117C; Path=/; HttpOnly
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Date: Fri, 15 Nov 2024 05:55:43 GMT
调用接口http://127.0.0.1/sso/file/download,nginx报502错误
2024/11/15 05:44:57 [error] 20#20: *1 upstream sent duplicate header line:
"Transfer-Encoding: chunked", previous value: "transfer-encoding: chunked"
while reading response header from upstream
请问是我哪里设置的有问题吗,该如何处理?
网关设置如下:


nginx版本为1.27.2 设置如下:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscr...@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org