Why does IdHTTPProxyServer change the HTTP version of requests?

烂漫一生 提交于 2019-12-12 15:32:41

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/11612459/why-does-idhttpproxyserver-change-the-http-version-of-requests

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!