httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Cassetti <>
Subject [users@httpd] Issue with mod_proxy ProxyPass balancer and web sockets
Date Mon, 20 Dec 2010 17:12:08 GMT

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

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

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-Host: localhost\r\n
Connection: Keep-Alive\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 balancer://gf>
    BalancerMember http://localhost:8080

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

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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message