httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Cassetti <oscar.getstr...@gmail.com>
Subject [users@httpd] Issue with mod_proxy ProxyPass balancer and web sockets
Date Mon, 20 Dec 2010 17:12:08 GMT
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message