Netty HTTPProxyHandler always sends a CONNECT

吃可爱长大的小学妹 提交于 2021-02-10 15:58:57

问题


Is it right that HTTPProxyHandler always sends a CONNECT request? Isn't this only applicable when you want to do tunneling?


回答1:


HTTPProxyHandler does not know if you only want to tunnel http data, or want to make http request at the moment of connection, therefore, it guesses the option that works in both cases, since a standard complements HTTP proxy supports both the CONNECT and the old http proxy method call. If you need to implement a HTTP proxy using GET and other methods, just thread the connection as a normal HTTP connection, but specify the full url including the http:// part in the url.



来源:https://stackoverflow.com/questions/29446945/netty-httpproxyhandler-always-sends-a-connect

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