Hi Yann thanks again for all your help.

I am still trying to work out why the client isn't receiving the Upgrade
header in the response.
I see a proxy debug log:

[Thu Jan 05 11:04:24.002173 2017] [proxy:debug] [pid 65956]
proxy_util.c(3754): (54)Connection reset by peer: [client 127.0.0.1:51776]
AH03308: ap_proxy_transfer_between_connections: error on sock -
ap_get_brigade

[Thu Jan 05 11:04:24.002356 2017] [proxy:debug] [pid 65956]
proxy_util.c(2169): AH00943: WS: has released connection for (alfred.local)

[Thu Jan 05 11:04:28.001195 2017] [proxy:debug] [pid 65946]
proxy_util.c(3754): (54)Connection reset by peer: [client 127.0.0.1:51780]
AH03308: ap_proxy_transfer_between_connections: error on sock -
ap_get_brigade

[Thu Jan 05 11:04:28.001369 2017] [proxy:debug] [pid 65946]
proxy_util.c(2169): AH00943: WS: has released connection for (alfred.local)

Any idea what that might be about and if it is related?


2017-01-05 6:55 GMT-03:00 Yann Ylavic <ylavic....@gmail.com>:

> On Thu, Jan 5, 2017 at 10:36 AM, Yann Ylavic <ylavic....@gmail.com> wrote:
> >
> > For the record (after private discussion with Adam), it seems that a
> > configuration like the below would work for http(s) and ws(s) on the
> > same URL:
> >
> >   RewriteEngine on
> >   RewriteCond %{HTTP:Upgrade} "(?i)websocket"
> >   RewriteRule ^/(.*)$ wss://backend/$1 [P]
> >   ProxyPass / https://backend/
>
> *But* note that having both HTTP(s) and WS(s) on the same URL it is
> *not* recommended, mainly for security reasons.
>
> While mod_proxy_http is a strict HTTP protocol validator,
> mod_proxy_wstunnel is only a tunnel (a TCP proxy) once the upgrade is
> asked by the client/browser).
>
> So with the above configuration a simple Upgrade header in the request
> would open a tunnel with backend, including for "normal" HTTP traffic.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to