websockets and chunked encoding

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

 



Hi,

Not sure which part to blame - whether it is Apache, mod_passenger or a
browser - but my websocket handshake gets corrupted by apache sending it
using chunked encoding.

Following is the response packet that indicates switching to websocket:

HTTP/1.1 101 Switching Protocols
Date: Thu, 10 Apr 2014 15:21:28 GMT
Server: Apache/2.2.15 (CentOS)
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: S7wgnmtVSahQDCifkYwFlQajWcI=
X-Powered-By: Phusion Passenger 4.0.41
Status: 101 Switching Protocols
Transfer-Encoding: chunked
Content-Type: text/plain; charset=UTF-8

5
..1::

The problem is that right after that the server software (nodejs running
via mod_passenger) sends actual websocket frame but apache encodes it
using chunked encoding (prepends it with chunk length - the number 5 in
my example). Since the first byte of websocket frame is supposed to be
frame opcode the chunk length is taken by browser (tested with Chrome)
as this opcode and whole websocket is corrupted.

What's wrong? Is this apache's fault? I can see other webservers are not
using chunked encoding when connection gets upgraded to websocket... Any
way around the problem?

Thanks, Antony.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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