https://bz.apache.org/bugzilla/show_bug.cgi?id=65294

            Bug ID: 65294
           Summary: Reverse proxy regression for websockets application
           Product: Apache httpd-2
           Version: 2.4.47
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: All
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The problem:
Web applications using websockets fail to refresh their content in the
webbrowser when the application is hidden behind an Apache reverse proxy.
Since when does this happen:
This happens in Apache httpd-2.4.47. Everything was working fine with Apache
httpd-2.4.46 and earlier.
Examples:
The two applications that I use which show this behavior: NoVNC
(https://novnc.com/) and Otto (http://ottoaudiojukebox.com/)
Operating System:
Slackware Linux 14.2 (64-bit)

Detailed description follows. It focuses on NoVNC since I think more people use
this than the Otto Jukebox.

Relevant httpd configuration:
    ProxyRequests Off
    ProxyVia on
    ProxyAddHeaders On
    ProxyPreserveHost On
    <Proxy *>
        Require all granted
    </Proxy>
    RewriteEngine On
    RewriteCond %{REQUEST_URI}  ^/remco                         [NC]
    RewriteCond %{QUERY_STRING} transport=polling               [NC]
    RewriteRule /(.*)           http://127.0.0.1:6080/$1        [P,L]
    RewriteCond %{HTTP:Connection}      Upgrade                 [NC]
    RewriteCond %{HTTP:Upgrade}         =websocket              [NC]
    RewriteRule /(.*)                   ws://127.0.0.1:6080/$1  [P,L]
    ProxyPassReverse /websockify ws://localhost:6080/websockify retry=2
    <Location /remco/>
        Require all granted
        ProxyPass http://localhost:6080/
        ProxyPassReverse http://localhost:6080/
    </Location>

Observed behavior:
Login to the backend server via reverse proxy and NoVNC server works fine.
The first mouse click triggers a screen refresh (for instance, new window
brought into focus).
Subsequent mouse clicks or key presses *do* get through to the backend VNC
server: by having a VNC client connected as well I can observe that all
keypresses and mouse clicks are received and handled properly by the VNC
server.
However, the NoVNC web client in the browser does not refresh the screen. This
makes the application un-usable since interaction with the backend is
impossible using the NoVNC browser client.
There is exactly one reproducible case where I can get some interactive
behavior: when I click-drag the mouse across a window containing text, this
text is highlighted, and in this case, the NoVNC client inside the browser
*does* refresh the window content, i.e. it shows the highlight.
Click-dragging the mouse over surfaces *not* containing text, i.e. not
triggering a text highlight, are not inducing the NoVNC client to redraw the
window.

The un-modified configuration above works flawlessly with a httpd-2.4.46
reverse proxy but fails with httpd-2.4.47.

Slackware maintainer Patrick Volkerding supplied me with a custom httpd-2.4.47
package for testing, where all updates to proxy_wstunnel since 2.4.46 have been
reverted; because we thought that the wstunnel module might be where the root
cause lies, it has had a lot of code changes.
But this modified httpd-2.4.47 package shows exactly the same broken behavior
as the unmodified 2.4.47 code. We have no idea where the root cause lies.

If you need more information, please let me know.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to