Issue with mod_proxy ProxyPass balancer and web sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I believe I have found an issue in Apache/2.2 mod_proxy when using
balancers and  ProxyPass balancer in conjunction with web Sockets.
The issue is that mod_proxy seems not to pass  the following headers
Connection
Upgrade


When a client sends a ws handshake request as the following

GET /WTEST/jms HTTP/1.1\r\n
Sec-WebSocket-Key1: 1 5 416  H4J50 60\r\n
Connection: Upgrade\r\n
Upgrade: WebSocket\r\n
Origin: http://localhost\r\n
Sec-WebSocket-Key2: 48 91 083 N0  Z5\r\n
Host: localhost\r\n
\r\n


mod_proxy passes to one of  members balancer the following

GET /WTEST/jms HTTP/1.1\r\n
Host: localhost\r\n
Sec-WebSocket-Key1: 1 5 416  H4J50 60\r\n
Origin: http://localhost\r\n
Sec-WebSocket-Key2: 48 91 083 N0  Z5\r\n
X-Forwarded-For: 127.0.0.1\r\n
X-Forwarded-Host: localhost\r\n
X-Forwarded-Server: 127.0.1.1\r\n
Connection: Keep-Alive\r\n
\r\n


The missing headers are fundamentals for the Web Sockets protocol handshake.

I wonder if it is possible to configure mod_proxy to pass the missing
headers. My current configuration is as follow

ProxyRequests       Off
ProxyPreserveHost   On

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

<Proxy balancer://gf>
    BalancerMember http://localhost:8080
</Proxy>


<VirtualHost *:80>
<Location />
    ProxyPass balancer://gf/ lbmethod=byrequests
</Location>
</VirtualHost>


Please let me know if you need  more details on this as I captured the
traffic between client-> Apache -> balancer using wireshark

I also wonder if there is any on going work to make mod_proxy web sockets aware.

Thank you

--
Oscar Cassetti

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux