Bug 61142 - mod_proxy_wstunnel to upgrade to any protocol dynamically
Summary: mod_proxy_wstunnel to upgrade to any protocol dynamically
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_wstunnel (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2017-06-01 15:09 UTC by Joerg Baesner
Modified: 2017-10-03 13:03 UTC (History)
0 users

Reproducer application (13.88 KB, application/octet-stream)
2017-07-03 13:15 UTC, Joerg Baesner
patch to fix the issue (1.34 KB, patch)
2017-07-11 09:56 UTC, jfclere
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Baesner 2017-06-01 15:09:02 UTC
I'm trying to use Apache httpd 2.4.x in order to proxy incoming connection to another IP/Port used by Wildfly 11 that listens to an upgraded http connection.

In this specific case I'm trying to proxy a remote JMS invocation. Here more than one connection are being used by the "framework" code, each having a different "upgrade".

The first request has the upgrade 'jboss-remoting' whereas the second request has the upgrade 'activemq-remoting'. This is due to the fact that the initial request is made by the JBoss remoting and the next request is then being handled by netty from the messaging sub-system 'ActiveMQ'...

So what is needed is a dynamic upgrade to the protocol in the header.

I'll provide a way to reproduce it later, as there're currently some errors in the community projects...
Comment 1 jfclere 2017-06-01 15:45:01 UTC
Note I have already add some logic in mod_proxy_wstunnel to allow different configurable upgrade, this case is similar except we use a single port/ip to upgrade to 2 different protocols in the first request Upgrade header contains the protocol the back-end will do, mod_proxy_wstunnel tunnels so that be quite easy to add.
Comment 2 Joerg Baesner 2017-07-03 13:15:25 UTC
Created attachment 35093 [details]
Reproducer application

This zip contains a simple Maven project that can be used to create this situation. An explanation how to use the project is given in the included README.md...
Comment 3 jfclere 2017-07-11 09:56:19 UTC
Created attachment 35117 [details]
patch to fix the issue

patch for 2.4.x
Comment 4 jfclere 2017-07-11 12:06:19 UTC
Committed in trunk and back port proposed for 2.4.x
Comment 5 Yann Ylavic 2017-10-03 13:03:55 UTC
Backported to 2.4.28 in r1808698.