为什么IdHTTPProxyServer更改请求的HTTP版本? [英] Why does IdHTTPProxyServer change the HTTP version of requests?

查看:87
本文介绍了为什么IdHTTPProxyServer更改请求的HTTP版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我发现IdHTTPProxyServer自动将所有HTTP/1.1请求更改为HTTP/1.0请求.对我来说有点奇怪,因为我认为代理服务器不应更改HTTP版本.有什么方法可以强制代理服务器不更改HTTP版本?

Recently, I found that IdHTTPProxyServer automatically changes all HTTP/1.1 requests to HTTP/1.0 requests. It is a little bit weird for me as I think a proxy server should not change the HTTP version. Is there any way I can force the proxy server to not change HTTP version?

推荐答案

TIdHTTPProxyServer 目前不支持HTTP 1.1.更改HTTP版本的行为是硬编码的,因为 TIdHTTPProxyServer 实际上并没有按原样传递客户端的请求,而是发送了自己的HTTP 1.0请求,其中包含了客户端的请求数据.唯一可以更改的方法是编辑 IdHTTPProxyServer.pas ,然后重新编译Indy.

TIdHTTPProxyServer does not support HTTP 1.1 at this time. The behavior that changes the HTTP version is hard-coded, as TIdHTTPProxyServer is not actually passing through the client's request as-is, but is sending its own HTTP 1.0 request that contains the client's requested data in it. The only way you can change that is to edit IdHTTPProxyServer.pas and then recompile Indy.

这篇关于为什么IdHTTPProxyServer更改请求的HTTP版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆