On 01/11/2019 21:15, Yann Ylavic wrote:
Hi Jean-Frédéric,
sorry to dig up an old commit, I'm currently working on integrating
wstunnel into mod_proxy_http and wondering what is the use case for
upgrade=NONE. Please see below...
The upgrade=NONE was added to work around
https://issues.jboss.org/browse/JBCS-291, I will dig again in the
problem later today.
On Thu, Jul 13, 2017 at 2:58 PM jean-frederic clere <[email protected]> wrote:
On 07/12/2017 07:25 PM, Jacob Champion wrote:
On 07/11/2017 05:36 AM, Yann Ylavic wrote:
I think it's quite hazardous to use/allow ANY and would prefer the
upgrade_method (worker->s->upgrade) to be a list of acceptable protocols.
I think both ANY *and* NONE are dangerous. Both of them turn
proxy_wstunnel into a generic TCP forwarder (and NONE does so without
any opt-in on the client's part).
I see some possible use of upgrade=ANY (tunnel any protocol after the
upgrade, no restriction), but NONE is bypassing the check for the
client Upgrade header and act as if it were Websocket. Why would we
upgrade a connection if the client does not ask for it?
So how I have the following to proxy:
<request>
GET /jboss-websocket-hello/websocket/helloName HTTP/1.1
[snip]
Connection: keep-alive, Upgrade
[snip]
Upgrade: websocket
[snip]
</request>
<response>
HTTP/1.1 101
Upgrade: websocket
Connection: upgrade
[snip]
</response>
...,..9e...,.$.H...W(I-.QH+..U(OM*.O.N-QH.K)...+..
Tomcat web socket stuff...
So yes the HTTP/1.1 really needs to upgrade and NONE is just a work-around.
The above is some usual Websocket upgrade AFAICT, don't
upgrade=websocket or upgrade=any or even no upgrade at all work in
this case?
Regards,
Yann.
--
Cheers
Jean-Frederic