gpt4 book ai didi

Apache 使用 http/1.0 响应,即使请求是 http/1.1

转载 作者:塔克拉玛干 更新时间:2023-11-01 19:08:47 25 4
gpt4 key购买 nike

我将 Apache Http 服务器 2.4 版配置为后端服务器(实际上是 Glassfish App Server)的代理。 MPM 是 worker

配置大部分是默认的。代理配置

ProxyPass /context/ http://backend.com:8080/context/ keepalive=On ttl=25 timeout=300 max=50
ProxyPassReverse /context/ http://backend.com:8080/context/

我在浏览器中打开页面,它向 Apache 发送 GET http://example.com/context HTTP/1.1。 Apache 返回带有 Connection: close header 的响应 HTTP/1.0 200 OK。但实际后端服务器响应包含 HTTP/1.1 200 OK

为什么 Apache 将代理响应从 1.1 降级到 1.0?

最佳答案

force-no-vary 是原因。文档说:

force-no-vary This causes any Vary fields to be removed from the response header before it is sent back to the client. Some clients don't interpret this field correctly; setting this variable can work around this problem. Setting this variable also implies force-response-1.0.

force-response-1.0 This forces an HTTP/1.0 response to clients making an HTTP/1.0 request. It was originally implemented as a result of a problem with AOL's proxies. Some HTTP/1.0 clients may not behave correctly when given an HTTP/1.1 response, and this can be used to interoperate with them.

关于Apache 使用 http/1.0 响应,即使请求是 http/1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25266860/

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